哪的煎饼php过滤非法字符第1个回答:1_凤求凰_12017-10-09关注帮你写了个

第1个回答:

1_凤求凰_12017-10-09关注帮你写了个函数,要用时,调用一下就可以了,希望对你有帮组functionsafe_string($str){//过滤安全字符$str=str_replace("'","",$str);$str=str_replace('"',"",$str);$str=str_replace("","$nbsp;",$str);$str=str_replace("\n;","<br/>",$str);$str=str_replace("<","<",$str);$str=str_replace(">",">",$str);$str=str_replace("\t","",$str);$str=str_replace("\r","",$str);$str=str_replace("/[\s\v]+/","",$str);return$str;}