Jump to content

Using a header, and relative paths.


nafetski

Recommended Posts

Hey everyone, I appologize if this has been answered previously...I've searched and havn't had much luck.

 

I've coded a site that uses includes for many of the elements of the page.  The header, navigation menu, and footer are all includes...and all the elements inside them I've pointed them at the root directory for navigation purposes.  The reason for this is I couldn't think of a way that relative links would work...since many of the different pages that are on this site are deep in the file tree.

 

However, I come to find out that as the site is deployed...none of the links to the doc root are valid since the naming convention they're using on the server is different.

 

Is there a way in PHP to set a variable, or some sort of function that writes a relative path for you when it's called?

 

Any help would be greatly appreciated!

 

-Nafetski

Link to comment
https://forums.phpfreaks.com/topic/74729-using-a-header-and-relative-paths/
Share on other sites

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.