帝国CMS如何按tags分类调用标签教程

来自:互联网
时间:2024-01-24
阅读:

调用标签代码如下:

<?
$tagql=$empire->query("select tagid,tagname,path from {$dbtbpre}enewstags where cid in(1,2,3,4,5,6,7) and isgood=1 order by cid asc limit 20");
$bqno=1;
while($r=$empire->fetch($tagql))
{
?>
<li ><a href="/tag/<?=$r[path]?>.html" target="_blank"><?=$r[tagname]?></a></li>
<?php
$bqno++;   
}
?>

in(1,2,3,4,5,6,7)为指定的tags分类ID

limit 20调用20条信息

返回顶部
顶部