Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
M_Gilliam

Creating Web Applications Help

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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 :) )

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...