Include Files Screw Up Hyperlinks

I'm trying to get my head round includes:

A page that works fine when called by name from the includes folder loses its images etc when called as an include in a page closer to the web root.

Thus:includes/page1.asp contains the following

img scr="../images/pic.gif"

This displays the picture when the page is viewed on its own. The picture url is http://localhost/school/images/pic.gif

But when includes/page1.asp is used as an include in page2.asp (in the web root) the image is not found because the url is http://localhost/images/pic.gif

Is it something to do with virtual versus absolute file paths?

View Replies




Copyrights 2005-15 www.BigResource.com, All rights reserved