从文章中提取图片
$pattern_img='@(^(http://)?)*([a-zA-Z0-9_\.\/\-]+)(\.jpg|gif|bmp|png)$@i';
$shequs=array();
while(count($shequs)<4){
$shequs=db_connect(100,41);
break;
}
echo count($shequs);
foreach ($shequs as $key=>$value){
$shequ_imgs=$value[8];
preg_match_all('@((http://)?)*([a-zA-Z0-9_\.\/\-]+)\.(jpg|gif|bmp|png)@i', $shequ_imgs, $imgs);
if($imgs[4][0]=="gif" || $imgs[4][0]=="jpg" || $imgs[4][0]=="png" || $imgs[4][0]=="bmp"){
echo "<p>图片".$imgs[0][0]."<br />";
echo "<img src='".$imgs[0][0]."'/><br />\n";
echo "</p>";
}
}