include problem

    Date: 10/11/05 (PHP Community)    Keywords: css

    afternoon all, i'm back with another question. hopefully a lot more simple this time hehe :)

    i've been creatins a site and sticking to accessibility laws etc, using css to position everything. Which has led me to use includes for header, footer and menu. This all works fine when everything is in one directory, but my problem is that i want to have 5 pages in a special directory called admin. The problem being that when i then include header, footer and sidenav, the links on them want to look for pages with the admin directory!

    There must be some way of making header, footer and sidenav so that which ever directory the page is that calls them, they still look in the right place. I'm looking to avoid using absolute paths because im having to create and test the site on my server, and when it's finished it will be placed on a different server, so migration would be a nightmare if i used absolute :(

    i thought it might be something to do with $_SERVER['DOCUMENT_ROOT'] ? is there an equivelant SITE_ROOT or something?

    Source: http://www.livejournal.com/community/php/354219.html

« Programming a Tag Function || database randomness »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home