brian wrote:
Larry Garfield wrote:
On Tuesday 28 August 2007, brian wrote:
If you have to modify anything other than a single config file in order
to move your site/app from one server to another, then you have a
design
flaw. (I'd say that applies for moving the site to a subdirectory on a
server too, but that takes a bit more effort.)
I'm with Larry on this. Include a constants file at the top of your
scripts. In that file you can place a switch block that tests for the
$_SERVER['HTTP_HOST']. For each case, place something like:
That's bad, too, if you have multiple developers on the project. Just
have a separate config file that contains *nothing* but the
installation config, and every install has its own copy.
How so? If, by multiple developers, you mean multiple *development
domains*, then yes, that'd need tweaking. Otherwise, i fail to see the
badness.
Multiple developers as in more than one person coding the application.
You'd be sharing the development environment (database, files etc) - not
what you want.
Think if your app was in cvs/subversion and you had someone working on
the same stuff at the desk next to you.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php