【发布时间】:2012-11-27 07:49:09
【问题描述】:
所以我使用默认配置安装了 CI,并输入了 [示例代码] https://www.codeigniter.com/user_guide/tutorial/static_pages.html。
我尝试通过 localhost/codeigniter/index.php/pages/view 访问该页面,而 apache 给了我“找不到 - 找不到您请求的 URL”错误。
但如果我输入 localhost/codeigniter/index.php?/pages/view,它就可以工作!
我尝试将 application/config/config.php 中的基本 url 更改为空白,“http://localhost/”和“http://localhost/codeigniter/”,但仍然没有效果。
我已经用谷歌搜索并查看了用户指南,但仍然没有找到解决方案。
我必须在哪里看,我错过了什么? 感谢您的帮助。
【问题讨论】:
-
你不应该需要 ?,让它工作,不。由于您的子文件夹用完了 codeigniter,您可能希望将 base_url 设置为
http://localhost/codeigniter/ -
您能否发布您的
.htaccess文件,您可能需要进行调整以说明您使用的/codeigniter/子文件夹。
标签: php apache codeigniter