M_Gilliam Posted September 6, 2011 Share Posted September 6, 2011 Hello, I am having a problem with Chapter 8 "Creating Web Applications" pg. 195. While running my "index.php" through my web browser, I get several warning as follows: (It also happens with the downloaded script for this book "script_08_04") Warning: include(header.html) [function.include]: failed to open stream: No such file or directory in /home/content/87/8276687/html/index.php on line 11 Warning: include() [function.include]: Failed opening 'header.html' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/87/8276687/html/index.php on line 11 Welcome to a J.D. Salinger Fan Club Lorem ipsum dolor.... Another Header Lorem ipsum dolor... Warning: include(footer.html) [function.include]: failed to open stream: No such file or directory in /home/content/87/8276687/html/index.php on line 21 Warning: include() [function.include]: Failed opening 'footer.html' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/87/8276687/html/index.php on line 21 /* I created the "Templates and CSS" folders in my web root with both "header.html and footer.html" in the Templates folder and "1.css" in the CSS folder. index.php is in the web root. If I put all files in the web root It has no warnings but It doesn't incorporate the CSS file. " It doesn't look like example "D" on p. 195 " I was wondering if anyone knows what these warnings are and how to remedy the problem? Any help would be appreciated. Link to comment Share on other sites More sharing options...
M_Gilliam Posted September 6, 2011 Author Share Posted September 6, 2011 ..the filenames are correct I just need to know how to make my PHP script reconize the folders in my web root, as it does the same with the downloaded sript "script08_04" Link to comment Share on other sites More sharing options...
Jonathon Posted September 6, 2011 Share Posted September 6, 2011 This is down to basically not referencing the files constantly. But to help you I will need some more information from you. Are you on a live or local server? What is the full path to your index.php file what is the full path to the footer file what is the full path to the header file what is the full path to the css file you have also what code are you using to include the header, footer + css (I don't have the book so I can't really reference anything, but be as specific as you can be in order to help any other people help you ) Link to comment Share on other sites More sharing options...
M_Gilliam Posted September 6, 2011 Author Share Posted September 6, 2011 Ok I figured it out. I didnt realize that the folders in the web root were case sensitive. So instead of "templates" I named the folder "Templates" and "css" as "CSS". As soon as I exchanged the capital letters for lowercase letters, it worked fine. Link to comment Share on other sites More sharing options...
Recommended Posts