Php 从Yii中的模板生成新配置文件

Php 从Yii中的模板生成新配置文件,php,yii,console,Php,Yii,Console,我有配置模板文件: build/template/config/main.php build/template/config/params.php 这是protected/configconfig文件的模板 如何从模板文件生成新的配置文件 我尝试清除缓存,但这不是我想要的。您可以用于组合两个或多个配置文件。在受保护的/config/main.php中: return CMap::mergeArray( require 'build/template/config/main.php')

我有配置模板文件:

  • build/template/config/main.php
  • build/template/config/params.php
这是
protected/config
config文件的模板

如何从模板文件生成新的配置文件

我尝试清除缓存,但这不是我想要的。

您可以用于组合两个或多个配置文件。在受保护的/config/main.php中:

return CMap::mergeArray(
    require 'build/template/config/main.php'), 
    require 'build/template/config/params.php'), 
);