using include_once for headers, footers etc?
Posted: Mon Oct 18, 2004 6:30 pm
I have an index page that has header/navigation/contents/footer. The header, navigation and footer are just straight includes like:
<?php include 'navigation.php';?>
The contents is dynamically generated from links the user chooses from the navigation and passed to the index page as page=home or page=contact etc. The script puts the name together in a variable and then passes it to the page so it is like:
<? include "$page" . ".php";?>
My question is, should I use include_once rather than include for the header, navigation and footer as these files are not changing? Does it make much difference to server overhead? Or am I barking up the wrong tree with this?
Brad.
<?php include 'navigation.php';?>
The contents is dynamically generated from links the user chooses from the navigation and passed to the index page as page=home or page=contact etc. The script puts the name together in a variable and then passes it to the page so it is like:
<? include "$page" . ".php";?>
My question is, should I use include_once rather than include for the header, navigation and footer as these files are not changing? Does it make much difference to server overhead? Or am I barking up the wrong tree with this?
Brad.