安全过滤函数,用于过滤危险字符

function safe_replace($string) {
$string = str_replace('
','',$string);
$string =
str_replace(''','',$string);
$string =
str_replace(''','',$string);
$string =
str_replace('*','',$string);
$string =
str_replace('"','"',$string);
$string =
str_replace("'",'',$string);
$string =
str_replace('"','',$string);
$string =
str_replace(';','',$string);
$string =
str_replace('
$string =
str_replace('>','>',$string);
$string =
str_replace("{",'',$string);
$string =
str_replace('}','',$string);
return $string;
}