Change Yii:app()->Params Value?

How can I change params in config/main.php ?

I think I can change it like this:




Yii::app()->params->remove('key');

Yii::app()->params->add('key', $newMainProd_ids);



Should I save it?

How can I do it?

You can’t save it. The config file should only be changed by developers and should probably be considered a code change. If you need to be able to update settings from within the application, you should look into storing them in a database table.

This extension might be suitable.

Ok, thanks