Home  >  Article  >  Backend Development  >  codeigniter总是提示404

codeigniter总是提示404

WBOY
WBOYOriginal
2016-06-06 20:40:111072browse

我的系统是ubuntu-14.04 + nginx-1.4.6 + PHP-5.5.9
能正常打开application/config/routes.php中设置的default_controller设置的默认控制器。但是在浏览器中输入自己定义的控制器就提示404,这是为什么?

回复内容:

我的系统是ubuntu-14.04 + nginx-1.4.6 + PHP-5.5.9
能正常打开application/config/routes.php中设置的default_controller设置的默认控制器。但是在浏览器中输入自己定义的控制器就提示404,这是为什么?

可能是重写写错了
可能是route配置错了
可能是url写错了
一般情况下index.php不可缺

最好把nginx的重写规则,route规则和url贴上来,甚至控制器里的代码

这通常是因为没有找到你自定义的控制器的原因,检查一下控制器名和文件名以及对应的类名是否一致。

可以你的url贴出来。。看看呗。。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn