I have a header.php file which contains a .css file link.
When I \"include\" header.php into another php file in different fo
Based on Tom's answer I did a combination of base url and a PHP define (for less typing).
Somewhere in PHP:
define("HOST_BASE", "http://example.com/");
Then in the header file:
The base tag was new to me and I was worried about compatibility, but it appears to work well. There is more info about it at MDN.