【发布时间】:2015-07-13 18:27:29
【问题描述】:
我在 CodeIgnitor CI 中开发了应用程序。网站 ID 在本地机器上正常运行。 我的 htaccess 代码如下
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ROOT DIRECTORY NAME/
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
而我的目录结构是
|application
|css
|js
|htaccess
|index
我在 route.php 中为 default_controller 提供了控制器名称
如果我错了,请告诉我?
【问题讨论】:
-
很难知道你在哪里出错了。除非我们知道你的CI-3版本是什么?控制器名称、控制器功能和route.php是什么
-
错误信息是什么?有没有出现系统目录?
-
我认为你的应用程序目录不完整;在
application目录旁边,您应该有一个包含 CodeIgniter 核心的system目录。 -
@Nishant Nair 您是否已将 index.php 配置为删除?如果没有,那么您需要在任何地方使用
www.domain.com/index.php/controller。 -
如他所说,当系统文件夹丢失时怎么可能网站ID在本地机器上正常运行
标签: codeigniter