Weird Problem !! Can't load Controller.php

Hei guys, I got a very annoying problem here.



When SiteController extends from [color="#FF0000"]Controller[/color], it seems Yii couldn’t load Controller.php

However, if I make SiteController extends from [color="#FF0000"]CController[/color], everything works fine.

Anyone has any idea please?

CController is one of the framework classes while Controller is not. :)

Do you have a Controller.php file in your application? If yes, did you import it? :)

It is very weird as Yii takes care of it by default including Controller.php on your components folder and configure the main.php file accordingly to import it. Check your config file and make sure Controller.php is in its corresponding location.

main.php under protected/config folder

// autoloading model and component classes





Note that controller.php is generated by yiic when creating a new webapp, it’s located at /protected/components -

If you started to code your app manually then you don’t have this file

Yes, you’re right. I started this new project manually and I forgot to create the Controller.php

Thanks mate.

Right, I forgot to create Controller.php. Coz I created this new project manually … Thanks man