$pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
preg_match_all($pattern,$data['content'],$matchContent);
if(isset($matchContent[1][0])){
$data['cover']=$matchContent[1][0];
}else{
$data['cover']="http://127.0.0.1/Public/Home/images/dilogo.png";//设置封面为默认图片
}