codeigniter 2.0致命错误:未找到类'Controller' [英] codeigniter 2.0 Fatal error: Class 'Controller' not found in

查看:227
本文介绍了codeigniter 2.0致命错误:未找到类'Controller'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载新的codeigniter 2.0并把我的控制器,模型和视图文件在新的codeigniter 2.0安装。但我收到此错误



致命错误:在/Applications/MAMP/htdocs/site/application/controllers/forside.php第3行中找不到类'Controller' / p>

什么做错了?希望有人能帮助我。

在CodeIgniter 2中,你的控制器继承了超类 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆