hd.
hd.

Reputation: 18316

Yii - Add new entry in main Config file.

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?

Upvotes: 0

Views: 64

Answers (1)

Developerium
Developerium

Reputation: 7265

you can add to params :

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

and access it like

$key = Yii::app()->params['someKey'];

Upvotes: 2

Related Questions