帝国cms模板内容页SQl调用当前TAG标签

来自:互联网
时间:2023-04-29
阅读:

帝国cms内容页SQl方式调用当前TAG标签的方式 具体调用代码如下:

<?php
$fr=$empire->fetch1("select infotags from {$dbtbpre}ecms_news_data_{$navinfor[stb]} where id='$navinfor[id]'");
$infotags=$fr['infotags'];//这个就是infotags字段内容
$tag='';
$t=explode(',',$infotags);//去逗号
$d=count($t);
        for($i=0;$i<count($t);$i++)
        {
                if($t[$i])
                {
                        $tagslink="[!--news.url--]e/tags/?tagname=".urlencode($t[$i])."&tempid=1";
                       $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a> ";
                }
}
echo $tag;
?>
返回顶部
顶部