复制代码代码如下:<?PHPdefined('IN_phpcms') or exit('No permission resources.');</p> <p>class tongji{
复制代码代码如下:
<?PHP
defined('IN_phpcms') or exit('No permission resources.');</p> <p>class tongji{
function __construct(){
$this->db = pc_base::load_model("news_model");
}</p> <p> function postnum(){
$end = $_GET['end'] ? strtotime($_GET['end']) : time();
$i = 0;
while($i < 10){
$daystart = strtotime(" -1 day",$end);
$dayend = $end;
$where = "inputtime > $daystart and inputtime < $dayend ";
$number = $this->db->count($where);
echo date("Y-m-d",$daystart)."发表了".$number."<br/>";
$end = $daystart;
$i++;
}</p> <p> }
}
--结束END--
本文标题: phpcms教程之增加统计代码可以统计每天发表文章数量
本文链接: https://www.lsjlt.com/news/31800.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0