Вопрос

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