How To Make And Manage The Configuration Data?

I have some data that should be used for initializing my web application:




defaultModule = 2;

defaultNumberTables= 4;

currentNumberTables = 6;

and so on 

I have other page called setting.php that allow user to change these variables for customization. So Im looking for best solution in Yii for this statement. Currently, I have some ideas that I will store them in:

  • Create setting table in the database to handle it. Problem is it could contain a lot of column for each attribute.

  • Create setting.php.ini, I dont know how to do it and not sure that it’s writable or not?

  • Create setting.xml and store in data folder of the app. Problem is when searching, I found that Yii got many problems with XML.

I need someone who familiar with Yii, suggest to me some ways which safe and fast to solve this problem. Thank a lot.

Using table is the best solution, to store and manipulate data.

I tried to use table but now it has a very long list :lol: . And I cant add the comment beside the value. Still looking for better solution to store configuration data.