Home >php教程 >PHP源码 >phpcms 查询每日发表内容

phpcms 查询每日发表内容

PHP中文网
PHP中文网Original
2016-05-25 17:00:111089browse

phpcms 查询每日发表内容

<?php


defined(&#39;IN_PHPCMS&#39;) or exit(&#39;No permission resources.&#39;);

class tongji{

    function __construct(){

        $this->db = pc_base::load_model("news_model");

    }

    function postnum(){

        $end = $_GET[&#39;end&#39;] ? strtotime($_GET[&#39;end&#39;]) : 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++;

            

        }

    }

}

 以上就是phpcms 查询每日发表内容的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn