|
Posted by JDS on 10/15/67 11:53
On Fri, 14 Jul 2006 17:20:49 -0700, Chung Leong wrote:
> One possible strategy is to have separate config files under different
> names. Depending on which environment the application is running in,
> it'd load in the correct one. For example:
>
> $conf = parse_ini_file("{$_SERVER['SERVER_NAME']}.ini", true);
>
> I would keep both the production and the development version in SVN.
> That way you wouldn't forget that a config change is necessary for some
> newly developed code, since SVN will spot the change when you commit.
Thanks, all, for the insightful input.
I have opted for Chung's suggestion, as it feels best to me. The other
suggestions were all great as well!
So now, for the config, I have a static file that has non-environment
specific config details, and it includes a server-specific file based on
$_SERVER['SERVER_NAME'] for the server-specific stuff.
All configs are versioned, of course.
Allright, I think I'm starting to get the hang of using version control!
Later...
--
JDS
Navigation:
[Reply to this message]
|