function injectChk($sql_str) { //防止注入
$check = eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file|outfile', $sql_str);
if ($check) {
echo('非法字符串');
exit ();
} else {
return $sql_str;
}
}
阅读排行
- Java面试题全集(上) (1103176 )
- Wi-Fi 爆重大安全漏洞,Android、iOS、Windows 等所有无线设备都不安全了 (422581 )
- Jquery 使用Ajax获取后台返回的Json数据后,页面处理 (268726 )
- Java面试题全集(中) (237132 )
- 一个非常有用的函数——COALESCE (223140 )
- Java面试题全集(下) (221144 )
- Uncaught SyntaxError: Unexpected token ) (213606 )
- 如何用adb连接android手机?(我的亲自经历)------ 顺便说说unable to connect to 192.168.1.100:5555的原因和解决方法 (210827 )
- 如何利用C/C++逐行读取txt文件中的字符串(可以顺便实现文本文件的复制) (207682 )
- yum提示Another app is currently holding the yum lock; waiting for it to exit... (205905 )