First off let me say I'm no PHP expert, not even a beginner. I just know how to do that PHP include line in order to link to receptive elements.
My question is I have my index.php page will includes the PHP include tag that links to other PHP files such a header and footer. Pretty simple. Based on the file paths in the header PHP, for example, the file paths (a graphic in this case) is in relevance to the main index.php file (or w/e file) and not the linked PHP file that shared across the site.
So since all pages in my site are inside a folder for their section, and the homepage isn't (it's in the root folder), that means I have to have separate PHP files; one for the homepage, and one for the pages that are inside folders because they have slightly different paths to the graphics folder. Index.php might go (graphics/image.gif) where the others would go (../graphics/image.gif). So I would need to two different PHP files where the only difference is the (../graphics) part.
Am I right?
Hope that makes sense!
__________
Just specify the full URL path (also known as Absolute path) when setting up where the images are located eg:
img src=" http:// mysite.com / images / logo.gif "
this way no matter where the included file finds itself being used the route to the images remains the same.