As mentioned, header.php must be in the same directory as the file.
However, if the file is included by another php file, the include path may be different.
Let's say your folder structure is such
a.php
/extra/b.php
/extra/c.php
For example, a.php includes /extras/b.php and in b.php you just have a include("c.php");
When you invoke a.php, c.php cannot be found because c.php is expected to be in the same directory as a.php
If you are absolutely sure the files are in the same directory, try this
PHP Code:
include_once(dirname(__FILE__)."/header.php");
If you have doubts about where a file resides in, you can also echo out dirname(__FILE__) to see which directory it is in.
Bookmarks