//去除 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 为空了