2
jianzhiyao020 2017-06-28 17:44:27 +08:00
<?php
$content=preg_replace('/<img(.+)(>)/i','<img$1 class="lazy" $2' ,'11111<img class="s-news-img" src="https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=3241198462,2567756276&fm=80&w=179&h=119&img.JPEG" height="119" width="179">1111'); echo $content; |
3
jianzhiyao020 2017-06-28 17:47:16 +08:00
'/<img(.+?)(\/?>)/i'
这个才对,兼容<img /> |