DedeCms织梦动态获取会员总数

阅读  ·  发布日期 2019-05-26 12:23  ·  admin
/plus/ 下新建一个 memcount.php
 
01 <?php
02 require_once(dirname(__FILE__)."/../include/common.inc.php");
03 if(!empty($view))
04 {
05     $row = $dsql->GetOne(" SELECT COUNT(*) AS dd FROM `SzsFox_member` ");
06     if(is_array($row))
07     {
08         echo "document.write('".$row['dd']."');\r\n";
09     }
10 }
11 exit();
 
前台模板调用
 
1 共有会员<script src="{dede:field name='phpurl'/}/memcount.php?view=yes"type='text/javascript' language="javascript"></script>