帝国cms内容模板sql语句方式调用当前TAG标签
方法1
<?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;?>
方法2
<?$infotags=$navinfor[infotags];$tags=explode(',',$infotags);$count=count($tags);for($i=0;$i<$count;$i++){if($tags[$i]){$datar=$empire->fetch1("select * from {$dbtbpre}enewstags where tagname='$tags[$i]' limit 1");{$tag.='<a href="javascript:;" title="'.$tags[$i].'手机游戏合集">'.$tags[$i].'</a>';}}}echo $tag;?>
猜您喜欢的源码帝国CMS模板博客文章资讯自适应手机HTML5网站SEO优化版
帝国CMS7.5内核简洁文章资讯自适应手机HTML5综合类模板源码【内页 文章页、列表标题,描述,严格的SEO标题规范,利于SEO】
上一篇:帝国CMS内容页没有相关信息时,则调用其它文章信息的方法!
SQL 帝国cms 内容模板