事件:火车头采集的文章中包含了带水印的图片,需要去除
$content = "这是为什么呢<img href='http://www.sts.js' alt='xx' >,不会吧<script src='wwww.xxxx.com/index.js'>wstxsdsfdsfdsfdsfs</script>钟么了";
$content = preg_replace("#(<img(.*?)/?>|<script(.*?)>(.*?)</script>)#i","",$content);
echo $content;//这是为什么呢,不会吧钟么了
网友评论