
在对应文件中添加以下代码进行调用:
/* 防sql注入,xss攻击*/function actionClean($str){$str=trim($str);$str=strip_tags($str);$str=stripslashes($str);$str=addslashes($str);$str=rawurldecode($str);$str=quotemeta($str);$str=htmlspecialchars($str);//去除特殊字符$str=preg_replace("//|~|!|@|#|$|%|^|&|*|(|)|_|+|{|}|:||?|[|]|,|.|/|;|'|`|-|=|||/", "" , $str);$str=preg_replace("/s/", "", $str);//去除空格、换行符、制表符return $str;}//防止sql注入public function actionFilterArr($arr){if(is_array($arr)){foreach($arr as $k => $v){$arr[$k] = $this->actionFilterWords($v);}}else{$arr = $this->actionFilterWords($arr);}return $arr;}//防止xss攻击public function actionFilterWords($str){$farr = array("/]*?)>/isU","/(]*)on[a-zA-Z]+s*=([^>]*>)/isU","/select|insert|update|delete|drop|'|/*|*|+|-|"|../|./|union|into|load_file|outfile|dump/is");$str = preg_replace($farr,'',$str);return $str;}//防止sql注入,xss攻击(2)public function post_check($post) {if(!get_magic_quotes_gpc()) {foreach($post as $key=>$val){$post[$key] = addslashes($val);}}foreach($post as $key=>$val){//把"_"过滤掉$post[$key] = str_replace("_", "_", $val);//把"%"过滤掉$post[$key] = str_replace("%", "%", $val); //sql注入$post[$key] = nl2br($val);//转换html$post[$key] = htmlspecialchars($val); //xss攻击}return $post;} 韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享