php获取文章图片列表
直接看代码把:
$pattern = '#<img(.+?)src\s*=\s*[\"|\']([^"|^\']+?)[\"|\']([^>]*?)>#'; preg_match_all($pattern, $content, $match); $url_list = $match[2];$url_list = array_unique($url_list); // 图片去重
直接看代码把:
$pattern = '#<img(.+?)src\s*=\s*[\"|\']([^"|^\']+?)[\"|\']([^>]*?)>#'; preg_match_all($pattern, $content, $match); $url_list = $match[2];$url_list = array_unique($url_list); // 图片去重