I am modifying the code to some of my (home LAN) web-pages in the hopes of streamlining and reducing unnecessary code. I am wonder what the industry standard practice is for locating code that will be used by subsequent web-pages. (Note
: this project operates solely on a home LAN)
Below are the first few lines of the "homepage
" (index.php). I just moved the line "require_once 'php_functions/functions.php';
" into this block of code. So far, no errors have been experienced. So it is looking "good
". Would it be appropriate to continue moving PHP code into this block?
// Start the session
// Get current Working Directory
$_SESSION['cwd'] = getcwd();
// This may work for all subsequent pages. Need to verify.