dedecms织梦模板 调用当前会员发布的文章总数

/member/inc/config_space.php  最后 加入以下函数
  
function count_arc() { global $dsql,$uid; $sql = "SELECT mid,userid FROM `dede_member` WHERE `userid` = '".$uid."'"; $row = $dsql->GetOne($sql); $count = $dsql->GetOne("select COUNT(*) AS dd FROM dede_archives where mid='".$row['mid']."'"); return $count['dd']; }  

 
模版任意页面中调用
  
<?php echo count_arc();?>

 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6a9ac45f53199b4f84e3be962fef867b.html