I'm messing around with creating better structure in one of my apps. The root of the app is
/projects/manager/
although this will change over different deployment servers. All config vars are stored in
/projects/manager/config.php
A section of the site is stored in
/projects/manager/sections/user/
and this file needs to begin by including config.php from the app root (which is not necessarily the same as the www root).
I know i could use
include "/projects/manager/config.php";
but then i'd have to change the url for each seperate deployment. I could put the url in the config file, but then how do i load the config file?
I realise i could do some fancy footwork with [man]parse_url[/man], but again i'd have to put this functionality in each file.
So how do other people do it?