404页面未找到创建新页面时,未找到您请求的页面codeigniter [英] 404 Page Not Found The page you requested was not found while new page created codeigniter
本文介绍了404页面未找到创建新页面时,未找到您请求的页面codeigniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已将Codeigniter项目中具有不同文件名的Model,View,Controller文件复制到新的Model/Controller/View中.当我访问新页面时,发生以下错误:
I have copied Model, View, Controller files to new Model/Controller/View with different filename in a codeigniter project. When I access the new page the below error is occurring:
找不到404页
未找到您请求的页面.
推荐答案
如果复制(另存为)控制器或模型,则有以下几种原因
if you copy (save as) a controller or model, there are several reasons why a
404,找不到页面错误
404, page not found error
可能会发生:
- 该文件未以大写首字母保存
- 班级名称未更新
- 班级名称已更新,但不以首字母大写开头
- 对于控制器:路由未更新/未包含
例如,如果模型的文件名是MyModel.php,则需要以 class MyModel扩展了CI_Model {}
for example, if a model's filename is MyModel.php, it needs to start with
class MyModel extends CI_Model {}