Welcome to WebmasterWorld Guest from 184.108.40.206
Right now on my site I call 2 includes - a header.php and a footer.php.
A friend of mine suggested putting the code from both of those includes into one file, say 'includes.php' and then in my templates calling the code from the include as a variable.
Example, echo $header; and then echo $footer; in the appropriate places.
He said this would be more efficient because then the server only has to reference one file instead of two, even though the new includes.php file is bigger in file size.
I'm just wondering some of your opinions on this? Is it really more efficient?
This auto version treats the code as if it is required, so will produce fatal errors.
It will also call each file individually, however if this is a question about time taken to manually code then this may be a solution.
However some servers dont allow you to specify php directives in the htaccess file...so this may not work for you anyway, but could be worth a try.
[edited by: PHP_Chimp at 8:50 pm (utc) on Nov. 8, 2007]