codeigniter 2.0致命错误:未找到类'Controller' [英] codeigniter 2.0 Fatal error: Class 'Controller' not found in
问题描述
我已经下载新的codeigniter 2.0并把我的控制器,模型和视图文件在新的codeigniter 2.0安装。但我收到此错误
致命错误:在/Applications/MAMP/htdocs/site/application/controllers/forside.php第3行中找不到类'Controller' / p>
什么做错了?希望有人能帮助我。
CI_Controller
,而不是超类 Controller
在CodeIgniter 1中使用。 这同样适用于CI2中扩展类 CI_Model
而不是模型
。
i have download the new codeigniter 2.0 and put my controller,model and view files in the new codeigniter 2.0 installation. but i got this error
Fatal error: Class 'Controller' not found in /Applications/MAMP/htdocs/site/application/controllers/forside.php on line 3
What im doing wrong? it works with the old codeigniter version but the new one.. No :S
Hope some one can help me out
In CodeIgniter 2 your controllers inherit from super class CI_Controller
, rather than the super class Controller
used in CodeIgniter 1.
The same applies to models in CI2 which extend the class CI_Model
rather then Model
.
这篇关于codeigniter 2.0致命错误:未找到类'Controller'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!