The URI you submitted has disallowed characters...

  • 来源:
  • 更新日期:2018-05-09

摘要:XAMPP Version: 1.8.1 codeigniter 2.1.3 设置完虚拟主机后报 The URI you submitted has disallowed characters  错误 有说把$config[\'permitted_uri_chars\'] = \'a-z 0-9~%.:_-\';改为 $config[\'permitted_uri_chars

XAMPP Version: 1.8.1

codeigniter 2.1.3

002UASMrzy7605pjKJv15&690.jpg

设置完虚拟主机后报The URI you submitted has disallowed characters 错误

有说把$config[\'permitted_uri_chars\'] = \'a-z 0-9~%.:_-\';改为

 

$config[\'permitted_uri_chars\'] = \'a-z 0-9~%.:_-\'; 但是我改动后并没有发现什么效果 起作用的是下面的函数。

 

CI_URI 做一下改动即可

function _filter_uri($str) { if ($str != \'\' AND $this->config->item(\'permitted_uri_chars\') != \'\') { $str = urlencode($str); if ( ! preg_match("|^[".($this->config->item(\'permitted_uri_chars\'))."]+$|i", rawurlencode($str))) { exit(\'The URI you submitted has disallowed characters.\'); } $str = urldecode($str); } return $str; }

 

好像这个问题都跟xampp有关系似的。

具体原因不是非常清楚带有时间研究。