帝国cms内容页SQl方式调用当前TAG标签

admin 2024年1月19日13:47:44帝国cms技巧评论1,211 次浏览阅读模式

内容摘要

本文是介绍的帝国cms内容页SQl方式调用当前TAG标签的方式 具体调用代码如下:<?php$fr=$empire->fetch1("select infotags from {$dbtbpre}ecms_news_data_{$navinfo

文章正文

本文是介绍的帝国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;?>

代码注释

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2024年1月19日13:47:44
  • 转载请务必保留本文链接:https://anyun.org/a/webtips/ecmstips/2024/0119/17722.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: