When you use the CI framework, there is sometimes a problem when you open a Web page and display only the disallowed Key Characters error message. Some people say that there are illegal characters in the URL. But the confirmation URL is pure English, the problem still comes out. But after emptying the browser history and cookies. Refresh is no problem. Sometimes. Open a different browser. Some browsers may have problems. Some will not.
To solve the CodeIgniter framework application, the disallowed Key characters error prompts are presented. Locate the input file under the/system/core folder, and the following code:
Copy Code code as follows:
function _clean_input_keys ($STR)
{
if (! Preg_match ("/^[a-z0-9:_/-]+$/i", $str))
{
exit (' Disallowed Key Characters. ');
}
//Clean UTF-8 if supported
if (utf8_enabled = = TRUE)
{
$str = $this->uni->clean_string ($STR);
}
return $str;
}
replaced by:
Copy Code code as follows:
function _clean_input_keys ($STR)
{
$config = &get_config (' config ');
if (! Preg_match ("/^[". $config [' Permitted_uri_chars ']. "] +$/i ", Rawurlencode ($STR)))
{
Exit (' Disallowed Key Characters. ');
}
Clean UTF-8 if supported
if (utf8_enabled = = TRUE)
{
$str = $this->uni->clean_string ($STR);
}
return $str;
}