<?php
$str = '<p></p><p><img src="http://localhost:8100/static/uploads/images/2021/11/25/1637807129619ef419496b7.jpg"/></p><p><img src="http://localhost:8100/static/uploads/images/2021/11/25/1637807129619ef4194d23c.jpg"/></p><p><img src="http://localhost:8100/static/uploads/images/2021/11/25/1637807129619ef4194d23c.jpg"/></p><p><br/></p>';
preg_match_all('#src=[^<]+[^>]+.jpg#', $str, $matches);
print_r($matches);
php从字符串中提取图片URL
最新推荐文章于 2023-09-10 14:45:00 发布