【发布时间】:2014-01-20 13:07:18
【问题描述】:
我有一个基于 codeigniter 的代码,它在我的 ubuntu 机器上的 LAMP 安装中运行良好,我们将代码转移到基于 Windows 的 xampp 安装中。
控制器结构是这样的
application
- controllers
-API
- test.php(a test controller)
-test
- testmore.php (a test controller)
-test.php (a test controller, and this one works only)
当我们尝试像http://localhost/<appname>/test 那样访问 application/controllers/test.php 时,它运行良好;但是当我们尝试访问像 http://localhost<appname>/API/test/<functionName> 这样的其他控制器时,它会显示“404 Page not found”
请帮忙。
【问题讨论】:
-
您是否正在使用 htaccess 删除 index.php?如果是这样,htaccess 不能在 windows 服务器中运行。所以尝试使用 index.php 的 url
-
我觉得你应该把“API”改成api
-
@kumar_v .htaccess 在 Windows 上运行得很好,它不能在 IIS 上运行
-
您必须先向我们展示您的
routes.php和 .htaccess 文件,然后任何人才能做出明智的建议 -
你用什么替换
<appname>?
标签: php codeigniter