时间:2021-07-01 10:21:17 帮助过:2人阅读
if (get_magic_quotes_gpc()) {
$_GET = stripslashes_array($_GET);
$_POST = stripslashes_array($_POST);
}
function stripslashes_array(&$array) {
while(list($key,$var) = each($array)) {
if ($key != 'argc' && $key != 'argv' && (strtoupper($key) != $key || ''.intval($key) == "$key")) {
if (is_string($var)) {
$array[$key] = stripslashes($var);
}
if (is_array($var)) {
$array[$key] = stripslashes_array($var);
}
}
}
return $array;
}
http://www.bkjia.com/PHPjc/445021.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445021.htmlTechArticlephp 批量过滤post,get敏感数据 if (get_magic_quotes_gpc()) { $_GET = stripslashes_array($_GET); $_POST = stripslashes_array($_POST); } function stripslashes_array($array) { w...