$pattern = '/<img\s+[^>]*src\s*=\s*(?:"([^"]+)"|\'([^\']+)\'|([^\s>]+))/is';
if(preg_match_all($pattern, $str, $matches) > 0)
{
for($i=0; $i < count($matches[1]); $i++)
{
$temp = $matches[1][$i].$matches[2][$i].$matches[3][$i];
$path[] = $temp;
}
}
if(preg_match_all($pattern, $str, $matches) > 0)
{
for($i=0; $i < count($matches[1]); $i++)
{
$temp = $matches[1][$i].$matches[2][$i].$matches[3][$i];
$path[] = $temp;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货