$obj=M("News");
$info=$obj->where('id=1')->find();
//方法1*********
$soContent = $info['content'];
$soImages = '~
]* />~';
preg_match_all( $soImages, $soContent, $thePics );
$allPics = count($thePics[0]);
preg_match('//i',$thePics[0][0],$match);
dump($thePics);
if( $allPics> 0 ){
echo "
";//擷取的圖檔名稱
}
else {
echo "沒有圖檔";
}
/
echo $img_path;
/
echo $img_path;