/* ThinkPHP设置编码统一: 一.数据库设置为utf8_bin 二.HTML页面设置charset=utf-8,而且检查文档编码格式是否是utf-8.phpDesigner8设置方式为“文件->文件编码->选中UTF-8 */ <?php /** 这是后台index控制器 */ Class IndexAction extends CommonAction{ public function index(){ $this->display(); } Public functio…
public function index(){ import("@.ORG.Page"); //导入分页类 $Dao = M(); $count = count($Dao->query("SELECT * FROM ofuser WHERE uid IN (SELECT uid FROM ofid WHERE uid ='1')"));//总计条数 $Page = new Page($count, 10); //一页中的数量为5 $list = $Dao-&…
ThinkPHP 3.2.3自带的分页类位于:/ThinkPHP/Library/Think/Pages.class.php ,官方文档在这里:ThinkPHP3.2.3数据分页 Pages.class.php源码: <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +-----------…