【Thinkphp】记录一次分页的实现
thinkphp分页非常简单
1,控制器渲染数据: $studentList = StudentDb::paginate(5);
$this->view->assign('list',$studentList);
2,模板运用bootstrap的样式
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
3,分页
<div class="container">
<div class="row">
<div class='col-md-4'></div>
<div class='col-md-4'>{$list->render()}</div>
<div class='col-md-4'></div>
</div>
</div>