Jump to content

Recommended Posts

Posted

I've created header & footer PHP files, which reside on the 'main' bit of my site (not within a folder). When I try to reference them from a page within a folder, my images and links get confused. The links within that folder will have a duplicate folder name within the link, and it's looking for the images and links from the main area within that folder. (I hope that makes sense. If not, check the properties of the images, and look at the links on this page: http://www.dancers-tale.com/criosa/ )

 

All my files end with the .php. The 'command' for the php is:

>> include $_SERVER['DOCUMENT_ROOT']."/footer.php"; <<

 

The header & footer are working fine on the main area of the site.

 

Also, while I'm asking... is there a way to reference the header/footer.php files from a subdomain? I'm trying to integrate them into the gallery, and right now, they're just copy/pasted into the appropriate gallery files.

 

Could somebody help me clear this up? Thanks!

~Christy

Posted

Try adding a slash before your images in your code so that

 

<img src="logo-squares.jpg" width="250" height="88"><br>

 

becomes

 

<img src="/logo-squares.jpg" width="250" height="88"><br>

 

If that doesn't work, check that you have uploaded the files to your server. I get a 404 error when I try to view the images by typed the url into my browser.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...