<div> <?PHP $_post = db_find_one('post', array('tid' => $_thread['tid'], 'isfirst' => 1)); preg_match_all('/<img[\s\S]*?src\s*=\s*[\“|\'](.*?)[\"|\'][\s\S]*?>/i',$_post['message'],$matches); if($matches[1][0]) { echo “<img src = '{$matches[1][0]}' height = '100px'/> ”; } if($matches[1][1]) { echo “<img src = '{$matches[1][1]}' height = '100px'/>”; if($matches[1][2]) { echo “<img src = '{$matches[1][2]}' height = '100px'/>”; ?> </div>
最多显示三张文章内的图片,完事,手工!