php 正则过滤style,PHP 过滤常用标签的正则表达式
$str=preg_replace("/\s+/", " ", $str); //過濾多余回車
$str=preg_replace("/
$str=preg_replace("//si","",$str); //注釋
$str=preg_replace("//si","",$str); //過濾DOCTYPE
$str=preg_replace("//si","",$str); //過濾html標(biāo)簽
$str=preg_replace("//si","",$str); //過濾head標(biāo)簽
$str=preg_replace("//si","",$str); //過濾meta標(biāo)簽
$str=preg_replace("//si","",$str); //過濾body標(biāo)簽
$str=preg_replace("//si","",$str); //過濾link標(biāo)簽
$str=preg_replace("//si","",$str); //過濾form標(biāo)簽
$str=preg_replace("/cookie/si","COOKIE",$str); //過濾COOKIE標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾applet標(biāo)簽
$str=preg_replace("//si","",$str); //過濾applet標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾style標(biāo)簽
$str=preg_replace("//si","",$str); //過濾style標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾title標(biāo)簽
$str=preg_replace("//si","",$str); //過濾title標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾object標(biāo)簽
$str=preg_replace("//si","",$str); //過濾object標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾noframes標(biāo)簽
$str=preg_replace("//si","",$str); //過濾noframes標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾frame標(biāo)簽
$str=preg_replace("//si","",$str); //過濾frame標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾script標(biāo)簽
$str=preg_replace("//si","",$str); //過濾script標(biāo)簽
$str=preg_replace("/javascript/si","Javascript",$str); //過濾script標(biāo)簽
$str=preg_replace("/vbscript/si","Vbscript",$str); //過濾script標(biāo)簽
$str=preg_replace("/on([a-z]+)\s*=/si","On\\1=",$str); //過濾script標(biāo)簽
$str=preg_replace("//si","&#",$str); //過濾script標(biāo)簽
$str=preg_replace("/\s+/", " ", $str); //過濾多余回車
$str=preg_replace("/
$str=preg_replace("//si","",$str); //注釋
$str=preg_replace("//si","",$str); //過濾DOCTYPE
$str=preg_replace("//si","",$str); //過濾html標(biāo)簽
$str=preg_replace("//si","",$str); //過濾head標(biāo)簽
$str=preg_replace("//si","",$str); //過濾meta標(biāo)簽
$str=preg_replace("//si","",$str); //過濾body標(biāo)簽
$str=preg_replace("//si","",$str); //過濾link標(biāo)簽
$str=preg_replace("//si","",$str); //過濾form標(biāo)簽
$str=preg_replace("/cookie/si","COOKIE",$str); //過濾COOKIE標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾applet標(biāo)簽
$str=preg_replace("//si","",$str); //過濾applet標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾style標(biāo)簽
$str=preg_replace("//si","",$str); //過濾style標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾title標(biāo)簽
$str=preg_replace("//si","",$str); //過濾title標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾object標(biāo)簽
$str=preg_replace("//si","",$str); //過濾object標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾noframes標(biāo)簽
$str=preg_replace("//si","",$str); //過濾noframes標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾frame標(biāo)簽
$str=preg_replace("//si","",$str); //過濾frame標(biāo)簽
$str=preg_replace("/(.*?)/si","",$str); //過濾script標(biāo)簽
$str=preg_replace("//si","",$str); //過濾script標(biāo)簽
$str=preg_replace("/javascript/si","Javascript",$str); //過濾script標(biāo)簽
$str=preg_replace("/vbscript/si","Vbscript",$str); //過濾script標(biāo)簽
$str=preg_replace("/on([a-z]+)\s*=/si","On\\1=",$str); //過濾script標(biāo)簽
$str=preg_replace("//si","&#",$str); //過濾script標(biāo)簽
總結(jié)
以上是生活随笔為你收集整理的php 正则过滤style,PHP 过滤常用标签的正则表达式的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 盐蒸橙子的功效与作用、禁忌和食用方法
- 下一篇: 响螺片的功效与作用、禁忌和食用方法