【问题标题】:Codeigniter - 404 Page Not Found errorCodeigniter - 404 Page Not Found 错误
【发布时间】:2015-07-04 10:05:41
【问题描述】:

codeigniter 在我的本地机器上工作,但不在服务器上。

administrator/application

administrator/system

administrator/assest

我尝试了一些 .htaccess 文件,但 codeigniter 无法正常工作。

【问题讨论】:

  • 将代码粘贴到.htaccess
  • 您遇到什么错误?你还有问题吗?

标签: codeigniter


【解决方案1】:

在 codeigniter 3 上检查所有控制器和模型,确保 文件名和类名首字母 作为大写示例 Welcome.php 和类 Welcome

此外,如果您没有将 index.php 配置为在 codeigniter 2 或 3 版本上删除,那么您每次使用链接时都需要添加 url。

实时服务器 URL 示例

http://www.example.com/index.php/site

本地主机 URL 示例

http://localhost/project-name/index.php/site

一些 Htaccess 示例链接

How to remove index.php codeigniter 2 & 3

【讨论】:

  • 非常感谢,控制器名小写改大写
猜你喜欢
  • 1970-01-01
  • 2020-12-05
  • 1970-01-01
  • 1970-01-01
  • 2011-11-09
  • 2016-09-10
  • 2011-12-13
  • 1970-01-01
  • 2012-09-05
相关资源
最近更新 更多