The require_once() function is only needed when you are pulling in a file of functions and you code is such that this command could execute more than once.
If you just need to pull in a common
html file, such as the navigation for a site, then you should be using the
- Code: Select all
include('navigation.html');
instruction.
Any
php code within this file can pick up any variables set by other snippets of
php elsewhere in the host file.