...

Includes Question

stfc_boy
11-20-2007, 06:28 PM
Hi Guys,

I have a quick question say I have site which contains:

head.php
footer.php
left_menu.php
right_menu.php

and I have an index.php page in the top level of my website which calls these elements in, but then I have another page named sections.php in a folder named updates the same thing happens.

Now take footer.php for example may have an image in it:


images/logo.jpg


now that would work fine for index.php, but for updates.php the path would not work as the images logo would need to be specified as ../images/logo.jpg

So how do people get around this. I know I could make all paths absolute, but there must be an easier way around this as this is surely a common problem?

Thanks

Chris

Inigoesdr
11-20-2007, 06:34 PM
Use a path relative to your web root, such as "/images/logo.jpg". That way it will work on all pages, in any directory.

aedrin
11-20-2007, 06:54 PM
Or use the BASE tag.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum