举例: [e:loop={'news',10,18,1}] <?php $fr=$empire->fetch1("select newstext from {$dbtbpre}ecms_news_data_{$bqr[stb]} where id='$bqr[id]'"); $str=stripcslashes($fr['newstext']); preg_match_all('/<img.*?src="(.*?)".*?>/is',$str,$imgArr); $imgArr = array_unique($imgArr[1]); ?> <?=count($imgArr)?>张 <img src="<?=$imgArr[0]?>" width="200" height="200" /> <img src="<?=$imgArr[1]?>" width="200" height="200" /> <img src="<?=$imgArr[2]?>" width="200" height="200" /> <a href="<?=$bqsr['titleurl']?>"><?=$bqr['title']?></a><br> [/e:loop] |
1. newstext字段是不是在副表?
2. 要对newstext字段脱敏 stripcslashes($bqr['newstext']);