樱花动漫做网站商务网站开发公司
在搭建好CI框架后访问http://localhost/ci的时候总是出现Disallowed Key Characters.
解决办法:
在项目中搜索到包含“Disallowed Key Characters”的位置,一般在ci/system/core/Input.php中,大概在731行左右有如下代码:
if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
{exit('Disallowed Key Characters.');
}
把上面3行代码修改成下面的代码即可解决问题:
$config = &get_config('config');
if ( ! preg_match("/^[".$config['permitted_uri_chars']."]+$/i", rawurlencode($str)))
{exit('Disallowed Key Characters.');
}
转载于:https://blog.51cto.com/lfliangli/1381704