帝国cms内容页SQl方式调用当前TAG标签
本文是介绍的帝国cms内容页SQl方式调用当前TAG标签的方式 具体调用代码如下:<?php$fr=$empire->fetch1("select infotags from {$dbtbpre}ecms_news_data_{$navinfor[stb]} where id='$navinfor[id]'");$infotags……
本文是介绍的帝国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;?>
- 上一篇
帝国cms内容页调用正文附件下载的代码
[e:loop={"select * from phome_enewsfile_1 where classid='$navinfor[classid]' and id='$navinfor[id]' order by id desc",0,24,0,&
- 下一篇
帝国cms灵动标签实现循环子栏目数据
<?php$bclassid=$GLOBALS[navclassid];//取得本栏目id//取得本栏目下的子栏目?>[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `clas