快捷搜索:   服务器  PHP  IIS  安全  linux 安全

PHP过滤各种HTML标签的方法 PHP一次性过滤全部HTML标签的方法

一、PHP过滤各种单独标签 $str=preg_replace(/\s+/, , $str); //过滤多余回车 $str=preg_replace(/[ ]+/si,,$str); //过滤__(号后面带空格) $str=preg_replace(/\!--.*?--/si,,$str); //注释 $str=preg_replace(/(\!.*?)/si,,$str); //过滤DOCTY...

    共1页/1条