Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • 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.