I’m not even sure how or what to ask about this, I have a feeling that either of the functons dirname() and/or basename() hold an answer to my question, but I’m not sure… At this point, I have a separate header.php file for each of the main directories of my website, but I want to be able to use just one, to keep everything even more unified and make skinning the website easy.
But I’m not sure how to get everything to work. Obviously, if I include the header.php that is in the main /public_html/ directory, in a file that is in /public_html/portfolio/, paths to links and images are going to be broken. How can I define the paths to the links and images in that main header.php so they will always point to the same place, no matter where the script calling on the file is?