Re: Database includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux