CI框架提交表单时出现 Disallowed Key Characters 错误提示
来源:互联网 发布:魔兽世界5.4.8数据库 编辑:程序博客网 时间:2024/06/14 08:56
文件位置 system/core/Input.php
这和 CI 的字符串处理类设计有关,是这样的,通过get、post方法提交的字符串,CI 都交给 system/core/Input.php 这个类去处理。
url 里有非法字符。其实主要还包括post,get,cookie,session里面的数据,如果有非法字符串就会提示这个错误了。
所以要确保这些里面都没有非法字符串。
将Input类里的
1
2
3
4
5
6
7
8
function
_clean_input_keys(
$str
)
{
if
( ! preg_match(
"/^[a-z0-9:_/-]+$/i"
,
$str
))
{
exit
(
'Disallowed Key Characters.'
);
}
return
$str
;
}
换成
1
2
3
4
5
6
7
8
9
function
_clean_input_keys(
$str
)
{
$config
= &get_config(
'config'
);
if
( ! preg_match(
"/^["
.
$config
[
'permitted_uri_chars'
].
"]+$/i"
, rawurlencode(
$str
)))
{
exit
(
'Disallowed Key Characters.'
);
}
return
$str
;
}
0 0
- CI框架提交表单时出现 Disallowed Key Characters 错误提示
- 解决CI框架的Disallowed Key Characters错误提示
- 解决 CodeIgniter 框架应用中,出现Disallowed Key Characters错误提示的方法
- 为什么codeigniter 会出现这个 Disallowed Key Characters 错误提示
- ci框架url传递参数出现:The URI you submitted has disallowed characters
- Disallowed Key Characters.
- codeigniter Disallowed Key Characters
- php 5.3下跟CI 1.7.2配合时"The URI you submitted has disallowed characters"错误的解决
- codeigniter框架The URI you submitted has disallowed characters.错误解决方案
- Yii Form表单提交时出现错误
- ci框架 开发环境下面, php出现错误,直接返回500,而不是提示错误
- Spring mvc表单提交时出现400错误
- CI框架表单验证
- CI框架表单验证
- CI框架表单验证
- Jeesite框架,表单提交 出现400
- svn ci 出现错误
- 表单提交Servlet出现第一次404,第二次出现500错误
- mysql 中的内置函数
- java 读取文件路径中空格和中文的处理.. this.class.getResource
- codeforces-#478C. Table Decorations
- When would someone use Apache Tez instead of Apache Spark, or vice versa?
- swift-数组array
- CI框架提交表单时出现 Disallowed Key Characters 错误提示
- 曾国藩读书的十二条规矩
- STM32串口中断接收方式详细比较
- 数据结构 算法3.4(栈的应用) 表达式求值(stl版and数组模拟版)
- sql 学习笔记 文档
- mysql数据库导入导出
- 一维随机变量与概率分布
- Codeforces-273(div2) A. Initial Bet
- 一分钟会AP