php防注
2018-09-07 12:26
阅读:380
$_POST=sql_injection($_POST);
$_GET=sql_injection($_GET);
functionsql_injection($content)
{
if(!get_magic_quotes_gpc()){
if(is_array($content)){
foreach($contentas$key=>$value){
$content[$key]=addslashes($value);
}
}else{
addslashes($content);
}
}
return$content;
}
评论
亲,登录后才可以留言!