XAMPP Version: 1.8.1
codeigniter 2.1.3
Error reported after setting up web hosting: The URI you submitted has disallowed characters
It is said that change $config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-‘; to
$config['permitted_uri_chars'] = 'a-z 0-9~%\.\:_\-';
But I didn’t find any effect after I changed it. What works is the following function.
CI_ Just change the 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;
}
It seems that this problem has something to do with xampp
The specific reason is not very clear, with time to study