<?php$sql=$empire->query("select * from {$dbtbpre}ecms_news order by onclick desc limit 1");while($r=$empire->fetch($sql)){$text=GetTxtFieldText($r[newstext]); //獲取正文內容$text1=substr($text,12);//去除exit$datanr=stripslashes($text1); //冊除反$pattern ="/.*src=//"([^^]*?)//".*/i"; //正則取圖片preg_match_all($pattern,$datanr,$matchess);$diypic=$matchess[1][0]; //取第一張圖片地址?><img src="<?=$diypic?>"><?}?>
新聞熱點
疑難解答