首页 >php教程 >php手册 >php去除html中的script

php去除html中的script

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原创
2016-06-06 19:58:321814浏览

//去除 script 脚 本function delScript($string){ $pregfind = array("/script.*.*//script/siU",'/on(mousewheel|mouseover|click|load|onload|submit|focus|blur)="[^"]*"/i'); $pregreplace = array('',''); $string = preg_replace($pregfind, $pregrep

主要是 将<script></script> 及中间的部分给 replace 为空了

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn