Yes Barry
Yes Barry

Reputation: 9856

Zend application.ini vs config.ini (or xml) - where should db credentials go?

I have seen a lot of code snippets on the web and examples showing different variations of Zend_Config and application.ini. Additionally, I have seen some debates about ini config files vs xml config files. I personally have application.ini and a config.xml file.

As the Zend Framework has progressed I've seen more and more people put almost everything (or so it seems) in application.ini. Should I do the same?

Upvotes: 0

Views: 596

Answers (1)

user336242
user336242

Reputation:

As @mario says .ini style is way more readable for mortals beings while at the same time being not too bad to parse programatically. XML is wizzy easy for parsing (well it is in stuff like java) but awful to read and navigate through. Unless you really need to I would recommend sticking to just using .ini style files. You'll find it alot easier for other people to get up to speed on what configs 'doing'. That said you aren't stuck to just using one config file so feel free to break down configuration sections into multiple .ini files if it makes sense.

Upvotes: 6

Related Questions