I include the variable portion of my site, and have the static portions remain. I only use one .PHP. A while back, someone on some forum said my code was inefficent, but didn't explain why. I'm rebuiling my site, and would like to see how I could soup it up. This is my current code.
the top banner, layout, ect
<?php
if(!empty($HTTP_GET_VARS[page]) and file_exists("./$HTTP_GET_VARS[page].inc"))
{ include("./$HTTP_GET_VARS[page].inc"); }
elseif(!empty($HTTP_GET_VARS[album]) and file_exists("photos/$HTTP_GET_VARS[album].inc"))
{ include("photos/$HTTP_GET_VARS[album].inc"); }
else {
include("./main.inc");
}
?>
the footer, </body> ect