In my .protected/config/main.php I have the following:
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
// Yii::app()->name gets this...
'name'=>'Blais Family Ancestry WEB site',
/********** This is the line causing my exception **************/
'longname' => 'Blais Family Ancestry WEB site - private to specific Blais families',
/***************************************************************/
'preload'=>array('log'), // preloading 'log' component
....
....
....
and I get the following CException message:
Property "CWebApplication.longname" is not defined.
Source File
F:\Apps\Xampp_172\xampp\htdocs\YII\framework\base\CModule.php(435)
I cannot discover why this is. Any help is well appreciated.
Thanks in advance, Gil Blais
Page 1 of 1
CWebApplication.xxxxx not defined Setting an APP level variable
#2
Posted 09 January 2010 - 11:05 AM
You can't set "longname" because it's not an attribute of CWebApplication. If you want to store custom stuff, you can use the params array in your config. Example:
In your application you can access the params array like:
... 'params' => array( 'longname' => 'example', ), ...
In your application you can access the params array like:
echo Yii::app()->params['longname'];
Share this topic:
Page 1 of 1

Help












