Home > Article > Backend Development > Share a PHP database paging class, php database paging_PHP tutorial
本帖最后由 luenmicro 于 2014-11-12 23:19 编辑 分享一个PHP数据库分页类。 [code] class page { private $pagesize; private $lastpage; private $totalpages; private $nums; private $numPage=1; function __construct($page_size,$total_nums) { $this->pagesize=$page_size; //每页显示的数据条数 $this->nums=$total_nums; //总的数据条数 $this->lastpage=ceil($this->nums/$this->pagesize); //最后一页 $this->totalpages=ceil($this->nums/$this->pagesize); //总得分页数 if(!empty($_GET |
Detailed description: http://php.662p.com/thread-555-1-1.html