I figured it might be interesting to explain my entire config file/include file method. One of the reasons I've settled on this method is for ease of moving between a development server and a production server.
1. I have a repository directory (as already outlined in the article). The initialize.php script is for use with this repository code.
2. I use 2 configuration files for site specific stuff. These are stored in the conf directory of the repository.
a) File one i call sitename.base.conf.php and it contains the call to inlcude the intializaton script as well as server (production vs dev) specific base paths and urls. I actually have 2 versions of this file which i dont change once created becaue they only contain 3 pieces of information. One is for the dev server and one is for production server.
b) The second file is called sitename.conf.php and it first calls sitename.base.conf.php and then it defines constants specific to the site classes, directories, templates etc. Once i start developing the site I only alter this file so I can copy it to both servers w/o making server specific changes (base paths or urls).
3. I call only sitename.conf.php from all pages in the site. Because this file is in the repository/conf folder I can still just use include_once('sitename.conf.php');
So for a dev server I have:
The base files are dev/production specific and dont change. I make changes in the conf and initialize files because they are the portable files.
$reposPath = "/Library/Apache2/repository";
$LIB_DIR = $reposPath.'/libraries/';
And finally in any given page:
//blah blah do something clever with all those wonderful classes