0
我有配置模板文件:的模板生成新的配置文件中的Yii
build/template/config/main.php
,build/template/config/params.php
。
這是protected/config
配置文件的模板。
如何從模板文件生成新的配置文件?
我試着清除緩存,但這不是,我想要的。
我有配置模板文件:的模板生成新的配置文件中的Yii
build/template/config/main.php
,build/template/config/params.php
。這是protected/config
配置文件的模板。
如何從模板文件生成新的配置文件?
我試着清除緩存,但這不是,我想要的。
您可以使用CMap::mergeArray()來組合兩個或更多配置文件。在你的protected/config/main.php中:
return CMap::mergeArray(
require 'build/template/config/main.php'),
require 'build/template/config/params.php'),
);