您的位置:首页 > 帝国cms教程

帝国cms首页调用文章的tag

2022-11-11 12:46:54 帝国cms教程 95
<div class="fl"> <?php
$newbook1=$empire->query("select * from _yisvip__ecms_news_data_1 where id =".$bqr[id]."");
$r1=$empire->fetch($newbook1);
$a="$r1[infotags]";
$str=str_replace(',', ',', $a);
$tag='';
$t= explode(",", $str);
for($i=0;$i<count($t);$i++)
{
if($t[$i])
{
$rr=$empire->fetch1("select tagid from {$dbtbpre}enewstags where tagname='$t[$i]' limit 1");
$tagslink="/tag/".$rr[tagid]."/";
$tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a>";
}
}
echo $tag;
?></div>

 

 

 

相关推荐