标签:bsp tco list display set thinkphp page count lis
//进行分页
$user=D(‘Sks‘);
$count=$user->count();
$page=new \Think\Page($count,2); //每页两个
$page->setConfig(‘first‘,‘首页‘);
$page->setConfig(‘prev‘,‘上一页‘);
$page->setConfig(‘next‘,‘下一页‘);
$page->setConfig(‘last‘,‘末页‘);
$show=$page->show();
$list=$user->order(‘date‘)->limit($page->firstRow.‘,‘.$page->listRows)->select();
$this->assign(‘list‘,$list);
$this->assign(‘page‘,$show);
$this->display();
标签:bsp tco list display set thinkphp page count lis
原文地址:http://www.cnblogs.com/yjh1604600160/p/think23.html