Include header issue
I am converting a site from html to php and having some issues with the includes 'header.php'. Warning: include(/header.php) [function.include]: failed to open stream: No such file or directory in /home/********/public_html/index.php on line 1
Warning: include() [function.include]: Failed opening '/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/index.php on line 1
these are the two warnings I get. I have both the index.php and header.php stored in the public_html folder. Just not sure...why I am getting these errors? Do I need to put the full path of /home/*****/public_html/ after the include tag?
High Energy Magic Dept.
"/header.php" in that context indicates a file named "header.php" that is in the root directory of the file system ("/").
I'm guessing what you probably really want is something like:
Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." ~ from Nation, by Terry Pratchett
"But the main reason that any programmer learning any new language thinks the new language is SO much better than the old one is because he’s a better programmer now!" ~ http://www.oreillynet.com/ruby/blog/...ck_to_p_1.html
Your error message tells you that one of your scripts cannot find a file it's trying to [man]include[man]. You should probably bone up on path references. Understanding them is a fundamental skill in programming. If you don't understand how path references work, you are likely to have a lot of problems in the long run.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread