<?php //控制分页//分页$pagesize=4;$pagesql="SELECT COUNT(*) AS num FROM `{$DT_PRE}` company";$r= $db->get_one("SELECT COUNT(*) AS num FROM `{$DT_PRE}` company`");// var_dump($r);$pages = pages($r['num'],$page,$pagesize);$offset=($page-
1.在thinkphp/library/think/paginator/driver目录下新建文件Page.php 注意命名空间和继承 <?php namespace think\paginator\driver; use think\Paginator; class Page extends Paginator { public $rollPage=5;//分页栏每页显示的页数 //首页 protected function home() { if ($this->currentPage()
1 找到文件:/thinkphp/library/think/paginator/driver/Bootstrap.php <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +-------------------------------------------------------------