OK, it has been awhile since I have touched PHP. I am embarassed to ask such a silly question, but here it goes:
This is how I have each page set up on my site:
<?php
include("header.php");
echo "Hello World!";
include("footer.php");
?>
Header of course has the beginning HTML content and the Footer has all the closing code.
My problem is when the header is included in places other than the root. I know that you have to do the unix style "../". My problem is that I am using AJAX and so to avoid having each page have a list of javascript functions a mile long for the whole site included in the header.php file (because the head tag is there), I am hoping someone could help me figure out how to make this work:
<script language="javascript" type="text/javascript" src="/js/javascript.js"></script>
How can I make the references to files a bit more generic. I am developing this on xampp at home, but later it will be used as an intranet site at work.
Any help would be awesome!