帝国CMS调用当前栏目一共多少篇文章数量

帝国CMS调用当前栏目一共多少篇文章数量两种方法
  1. 方法1:[totaldata]$GLOBALS[navclassid],0,0[/totaldata]
复制代码
  1. 方法2:<?php
  2. $classid=$GLOBALS[navclassid]; //获取当前栏目ID
  3. $r=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_news where classid='$classid'");
  4. echo $r['total'];
  5. ?>
复制代码





上一篇:首页用灵动标签调用留言和留言人头像
下一篇:宝塔面板CentOS 8.x安装免费防火墙后nginx无法启动修改方法
如无回复请发邮件