I think this should be a fairly simple question for anyone who knows PHP. I am more of a designer and still in the process of learning PHP.
I have a site I built which includes a PHP header and footer include. In the header file (which is used by ALL pages in the site) I have links to CSS files, JavaScript files, etc.
Right now I am using this solution for the links and includes in the header…
http://<?php echo $_SERVER['SERVER_NAME']; ?>/css/style.css
The issue with that is that some of the pages in the site are SSL pages and need to use a HTTPS prefix, not HTTP. That being said, I’m wondering if there is a simple way to link to CSS files, JavaScripts, images, etc. within the header file other than what I’m currently using?
If that won’t work for you, write a PHP function.
and in your html code.