I have a quick question say I have site which contains:
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:
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?
Use a path relative to your web root, such as "/images/logo.jpg". That way it will work on all pages, in any directory.