现在的位置: 首页 > 综合 > 正文

preg_replace 过滤掉html代码中的script脚本

2013年02月12日 ⁄ 综合 ⁄ 共 985字 ⁄ 字号 评论关闭

 

$index_page = preg_replace("'<script[^>]*?>.*?</script>'smi", "<!-- js -->", $index_page);(经测试 很完美)

 

 

抱歉!评论已关闭.