详情页

php 过滤文章中图片的宽高(preg_replace)

时间:2024年03月01日

编辑:佚名

php 过滤文章中图片的宽高(preg_replace)
复制代码
<?php
$$newstext2=preg_replace('/<img[^>]*src=[\'"]?([^>\'"\s]*)[\'"]?[^>]*>/ie',"'<img src=\"$1\" width=\"100%\">'", $newstext);
echo $newstext2;
?>
相关文章
猜你需要