-- Stephan Stapel <[EMAIL PROTECTED]> wrote (on Monday, 25 June 2007, 06:00 PM +0200): > >Have a look at Zend_Config > >(http://framework.zend.com/manual/en/zend.config.adapters.ini.html > ><http://framework.zend.com/manual/en/zend.config.adapters.ini.html>). > > I am already using the config classes. I was just asking myself if > someone has best practises on using these classes. > > In fact, I'm already using Zend_Config_Xml with multiple sections, one > for each environment. > > Is this the path that you'd also sugggest to take? And how to best > decide which section is correct? Based on the $_SERVER['HTTP_POST'] > value? Or are there better alternatives?
I'm assuming you meant 'HTTP_HOST'. That's one way to do it. The other is if you use a versioning system that is capable of branching, you can have the bootstrap in the trunk grab the config's 'staging' section, and in production have it grab 'production'. This is less prone to error, and a good use of branching. -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
