I have a html_headers.inc.php script that I want to include in every script on the site, to drop in a style sheet, the headers of the page, etc.
It refers to main.css as the stylesheet to use, but when I get down into a subdirectory, i.e. /foo, the link obviously breaks because it's pointing to main.css and not ../main.css. What's the best way to guarantee it always points toward that top-level where main.css lives? I've got
http://<?= $_SERVER['HTTP_HOST']; ?>/main.css
working, but it seems like there must be a more correct way.