document.writeln('');
XiunoBBS 修羅論壇獲取最新會員的函數
xiunobbs會員相關信息調用方法
獲取文章中第一張圖片作為標題縮放圖
<?php
$pattern="/<[img|IMG].*?src=[\|\"](.*?(?:[\.gif|\.jpg|\.png]))[\|\"].*?[\/]?>/";
$content = $_thread[message]; //文章內容
preg_match_all($pattern,$content,$matchContent);
if(isset($matchContent[1][0])){
$temp = $matchContent[1][0];
}
?>主要是靠正則匹配出文章的圖片,然后選取一個,然后在用$temp 調用
<img src"<?php echo $temp;?>">