帝国cms首页调用文章的tag

  1. <div class="fl"> <?php
  2. $newbook1=$empire->query("select * from www_yisvip_com_ecms_news_data_1 where id =".$bqr[id]."");
  3. $r1=$empire->fetch($newbook1);
  4. $a="$r1[infotags]";
  5. $str=str_replace(',', ',', $a);
  6. $tag='';
  7. $t= explode(",", $str);
  8. for($i=0;$i<count($t);$i++)
  9. {
  10. if($t[$i])
  11. {
  12. $rr=$empire->fetch1("select tagid from {$dbtbpre}enewstags where tagname='$t[$i]' limit 1");
  13. $tagslink="/tag/".$rr[tagid]."/";
  14. $tag.="<a href='$tagslink' target='_blank'>".$t[$i]."</a>";
  15. }
  16. }
  17. echo $tag;
  18. ?></div>
复制代码






上一篇:虚拟空间如何获取帝国CMS手机端路径
下一篇:Notice: Undefined index: in ajax.php on line 3
如无回复请发邮件