Posted by Richard Lynch on 03/04/05 22:25
> 6. The method (and this is the important one IMHO) would not require
> editing "x" number of pages in a site to change some static path
> that was set on each page.
I believe you could get "x" to be 1, if you do this:
1. Set up a config_include_path.inc file in your DocumentRoot (possibly
virtual) directory.
2. Utilize $_SERVER['path_translated'] and $_SERVER{'documentRoot'] in all
the pages to temporarily set_include_path to your [virtual] DocumentRoot.
If *those* are broken, you might as well just not use that host. :-^
3. In the config_include_path.inc, use set_include_path to set up whatever
you need to use for the new server/configuration.
So every page will set their include_path to DocumentRoot, then include a
file that from there that will change the include_path to whatever you
need for that particular server.
It's a bit of a hack, but cuts the number of config files to one (1) for a
transfer/install.
--
Like Music?
http://l-i-e.com/artists.htm
[Back to original message]
|