帝国CMS内容页列表页怎么调用多张图片显示

举例:
[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]
帝国CMS内容页列表页怎么调用多张图片显示两个地方需要考虑 
1. newstext字段是不是在副表?
2. 要对newstext字段脱敏  stripcslashes($bqr['newstext']);

猜你喜欢

转载自blog.csdn.net/abc2575/article/details/80631237