【发布时间】:2012-05-07 02:35:17
【问题描述】:
假设我的页面已打开:
http://localhost/app1/profile/index/123/
current_url() 的结果是这样的:
http://localhost/app1/?profile/index/123
有一个不应该存在的?。问号似乎是由以下配置设置引起的:
$config['enable_query_strings'] = TRUE;
我需要在我的应用程序中启用查询字符串。有什么想法我需要做什么?
编辑 1:
另外,如果 URL 确实有查询字符串,我需要 current_url 也返回它。我希望 Phil Sturgeon 的解决方案 CodeIgniter current_url doesn't show query strings 能帮助我。
我正在使用 CI 2.1.0。
【问题讨论】:
标签: codeigniter codeigniter-2 codeigniter-url