function testAddslashes($array) {
if(!get_magic_quotes_gpc()) {
if(is_array($array)) {
foreach($array as $key => $val) {
$array[$key] = testAddslashes($val);
}
} else {
$array = addslashes($array);
}
$array=str_replace("","& # x",$array); //过滤一些不安全
字符s
$array=str_replace("
}
return $array;
}
if( $_POST)
{
print_r( $_POST );
echo '过滤前
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">