Php, Folders & Subdomains - Help!

liunx

Guest
I've created header & footer PHP files, which reside on the 'main' bit of my site (not within a folder). When I try to reference them from a page within a folder, my images and links get confused. The links within that folder will have a duplicate folder name within the link, and it's looking for the images and links from the main area within that folder. (I hope that makes sense. If not, check the properties of the images, and look at the links on this page: <a href="http://www.dancers-tale.com/criosa/" target="_blank">http://www.dancers-tale.com/criosa/</a> )<br /><br />All my files end with the .php. The 'command' for the php is:<br />>> include $_SERVER['DOCUMENT_ROOT']."/footer.php"; <<<br /><br />The header & footer are working fine on the main area of the site.<br /><br />Also, while I'm asking... is there a way to reference the header/footer.php files from a subdomain? I'm trying to integrate them into the gallery, and right now, they're just copy/pasted into the appropriate gallery files. <br /><br />Could somebody help me clear this up? Thanks!<br />~Christy<!--content-->
Try adding a slash before your images in your code so that <br /><br /><img src=http://www.totalchoicehosting.com/forums/lofiversion/index.php/"logo-squares.jpg" width="250" height="88"><br><br /><br />becomes<br /><br /><img src=http://www.totalchoicehosting.com/forums/lofiversion/index.php/"/logo-squares.jpg" width="250" height="88"><br><br /><br />If that doesn't work, check that you have uploaded the files to your server. I get a 404 error when I try to view the images by typed the url into my browser.<!--content-->
Thanks! The / did the trick!<br /><br />~Christy<!--content-->
 
Top