I am having problems at the moment using a PHP include effectively.
The stylesheet named style.css, when accessed from the index.php file in the main directory works fine.
The problem is I try and access it from the buy and contact us pages. Because these files are in
folders, it means that the CSS link on the left is not relevant for those pages. Obviously if I change it to:
"../css/style.css", that would work for the buy and contact us pages but not the home page in the main directory.
Here is an example of the buy page (also relevant to the contact us page).http://oi57.tinypic.com/2eauzbr.jpg
This is the PHP include I use on my home page index.php.
And this is the PHP include I use on my buy and contact us pages.
This allows the respective pages to link to the head.php, but obviously because the actual links in the head.php don’t change at the moment, it means it cannot work for the buy and contact us pages.
Using the example of the css/style.css line of code, how can I get it so this link is relative so it’ll work no matter where the page is housed? I don’t want to use absolute links because they’re a pain to change if need be.