As far as I know, The best place to put your configurations in an application based on Yii, is main.php
config file, which is situated in protected/config/main.php
. But it is important to put your custom configurations in a right place. That is in params
array. You can put your configs like below in config file:
'params' => array(
'webmaster' => 'YourEmail@example.com',
'required_php_version' => '5.4.1',
'my_app_version'=>'2.0.1.1',
'info_in_array'=>array(1,2,3,4,'so on ...')
// and so on
),
You can use these information in everywhere of your application like below:
Yii::app()->params['required_php_version'] //which returns 5.4.1 in this example.