`enable_query_strings` is Not Working Properly

只谈情不闲聊 提交于 2020-01-02 06:10:16

问题


I'm trying to use CodeIgniter, and xdebug. When I type in the following URL:

http://localhost/redux/index.php

xdbug works well. When I go to following URL:

http://localhost/redux/index.php?

I receive the following 404 error message:

XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=124466969367132 

Eclipse lanches Firefox with the second, wrong URL, and then I have to change it. I'm using enable_query_strings = TRUE, but I'm still getting the error. How do I solve this problem?


回答1:


To get this working perfectly, use:

$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;



回答2:


Make sure that you have both

$config['uri_protocol'] = "QUERY_STRING"; or $config['uri_protocol'] = "REQUEST_URI";

and

$config['enable_query_strings'] = TRUE;

If that doesn't work try changing your URI Chars to this

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';



来源:https://stackoverflow.com/questions/978325/enable-query-strings-is-not-working-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!