Re: Database includes

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

 



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.

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
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