1个回答
2015-11-27
展开全部
/member/inc/config_space.php 最后 加入以下函数
function count_arc()
{
global $dsql,$uid;
$sql = "SELECT mid,userid FROM `#@__member` WHERE `userid` = '".$uid."'";
$row = $dsql->GetOne($sql);
$count = $dsql->GetOne("select COUNT(*) AS dd FROM #@__archives where mid='".$row['mid']."'");
return $count['dd'];
}
模版任意页面中调用
<?php echo count_arc();?>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询