Jump to content

New Student having trouble with Includes and directory structure


Jaloney

Recommended Posts

Hi all, I have been perplexed for two days now, so I hope someone can shed some light on what I am doing wrong. The text says to: Then place header.html,footer.html, and style.css into the includes directory.

 

I made an includes (new folder) directory in the webdocs folder that my school provides for the course. I ftped header, footer, styles to this location along with the index.php file. I put the header and footer inside the includes folder, as well as outside of the folder. Seems where ever I put it, the only thing that shows up in my browser is my index.php file without the header, footer, and .css files attached.

 

I have restarted the whole project and did it again and I am still stuck. I think I need a new wording for the sentence? "Create an includes directory in the same folder as index.php." Folder structure is my weakness.

 

Thank you for your help in advance!

Sounds like the folder structure should be

  • webdocs
    • index.php
    • includes folder
      • header.html
      • footer.html
      • style.css

 

If that is the case, in index.php you would have

 

include("includes/header.html");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.