1$str=preg_replace("/s+/", " ", $str); //过滤多余回车 2$str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格) 3$str=preg_replace("/<!--.*?-->/si","",$str); //注释 4$str=preg_replace("/<(!.*?)>/si","",$str); //过滤DOCTYPE 5$str=preg_replace("/<(/?html.*?)>/si","",$str); //过滤html标签 6$str=preg_replace("/<(/?head.*?)>/si","",$str); //过滤head标签 7$str=preg_replace("/<(/?meta.*?)>/si","",$str); //过滤meta标签 8$str=preg_replace("/<(/?body.*?)>/si","",$str); //过滤body标签 9$str=preg_replace("/<(/?link.*?)>/si","",$str); //过滤link标签 10$str=preg_replace("/<(/?form.*?)>/si","",$str); //过滤form标签 11$str=preg_replace("/cookie/si","COOKIE",$str); //过滤COOKIE……
Continue reading