How can I extend the config.php file

Hi guys,

I’d like know if can I create another php file (or any thing like it) and call in default yii config.php.

I’m creating a module that need a differentiated configuration, and to not write every time the same rules on config.php I’d like create a separated file and call it on config.php file.

It’s possible?


From webdi comment on cookbook page:

example /protected/config/db.php:

return array(






in /protected/config/main.php:


hope it helps!


CMap::mergeArray() can help you