components/Test.php :
<? php
class Test extends CWidget
{
public $title='Testing';
public function run()
{
$this->render('test');
}
}
components/views/test.php :
<p> Hello World </p>
views/layout:
…
…
<?php $this->widget('Test'); ?>
…
…
main.php (config file) :
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
)
(by the way : what path does "application" is, is it somewere configured ? )
Message:
render('test'); } }render('test'); } }
Fatal error: Class 'Test' not found in D:\wamp\www\yii\framework\web\CBaseController.php on line 138
I cannot find the error