Class not found

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


&#039;import&#039;=&gt;array(


	&#039;application.models.*&#039;,


	&#039;application.components.*&#039;,


)

(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  ???

You have a space between <? and php in your Test.php?

Try to include this file explicitly in your controller class:

Yii::import('application.components.Test', true);

thankz…  :D (I was trying to find the fault for more than 1 hour)