$Table = M('Table');
$count = $Table ->where()->count();
$Page = new ThinkPage($count,10);
//自定义分页样式
$Page -> setConfig('next','下一页');
$Page -> setConfig('prev','上一页');
$Page -> setConfig('last','尾页');
$Page -> setConfig('first','首页');
$Page -> setConfig('theme','%HEADER% %FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END%');
$show = $Page->show();
$this->assign('page',$show);
$res = $Table->where()->limit($Page->firstRow.','.$Page->listRows)->select();
$this->assign('res',$res);