design - how to store configurations for php app -- xml or ini or db -
I found an app written in PHP, and there are several configurable variables, we are implementing a feature where Users can create sets of configurations and easily switch between them. How should I store my configs? As XML? In an .ini file? In multiple .i files? In DB?
If we add the road down, then what is the maximum flexibility to provide? Coding facility?
If I use DB, then I will have to use one of the main ones from the app for one of those reasons which is not worth the price, which has embarrassed me (in addition, We are using MDB files for our DB.)
I am going down the XML path, but I am having trouble in adding and editing configs using simple XML. Apart from that, AP is to be compatible with 5.1.6 php, and I'm a little worried about some of the functionality.
Creating a custom Ii file is never dealt with.
A small explanation: Users will not touch the files - they are non-technical so that the initial files will be installed by us, but then we are writing a tool that will be able to format our configuration (links) Choose, write.
I will choose either an ini file, as per the Xml file, or a php file, each option offered by Professional and Cons for XML vs Ini, XML provides more flexibility but it More difficult to maintain (less readable) If your needs come by the INI, then stay with the simple solution. Use XML only if you need more than IiI files, you can offer it
For PHP solutions, I evaluate readability between ini and xml, but existing Saving settings will be more difficult. So much as I like this approach, I do not recommend it for your current view.
Comments
Post a Comment