$url="http://XXXXX/article/012.html";$content=file_get_contents($url); //读取文章页面源代码if(preg_match("/<img.*>/",$content)){ //进行正则匹配判断是否有图片echo "检测到图片";}else{echo "未发现图片";}