12小时发文数量统计: <?=$empire->gettotal("select count(*) as total from [!db.pre!]ecms_news where newstime>UNIX_TIMESTAMP()-24*3600")?>
6小时发文数量统计: <?=$empire->gettotal("select count(*) as total from [!db.pre!]ecms_news where newstime>UNIX_TIMESTAMP()-6*3600")?>
上面写的是统计新闻表的,如果要统计其它且只需要改下表名即可。
本文摘自网络,不代表短经典网立场 https://www.duanjingdian.com/511.html