문제

I want to add a new entry for example 'domain' to config/main.php. I just add it but this error is given:

Property "CWebApplication.domain" is not defined. 

How can I add completely new entry to config?

도움이 되었습니까?

해결책

you can add to params :

...
'params' => array(
   'someKey' => 'someValue',
),

and access it like

$key = Yii::app()->params['someKey'];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top