Stephan Stapel schreef:
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?

Regards,

Stephan


Hi Stephan,

I would not recommend to base your configuration on the $_SERVER['*'] superglobal. Why? Because it could be manipulated by an attacker.

I would recommend you to hardcode your configuration somewhere in your bootstrap file, by defining a constant or similar.

Best,

Andries Seutens
http://andries.systray.be

Reply via email to