//-- 程序名称:strreplace()
//-- 程序用途:替换变量中的非法字符
//-- 传入参数:变量值
//********************************************************
function strreplace($str){
$str = strips教程lashes($str);
$str = str_replace(chr(92),'',$str);
$str = str_replace(chr(47),'',$str);
$str = str_replace(chr(10).chr(13),"
",$str);
$str = str_replace('<',"<",$str);
$str = str_replace('>',">",$str);
$str = str_replace(';',";",$str);
$str = str_replace('"',"“",$str);
$str = str_replace("'","‘",$str);
$str = str_replace(" "," ",$str);
$str = str_replace("/**/"," ",$str);
return trim($str);
}