这前5.0.3 分页用的好好的,更新到5.0.5后,就不行的啦
//分类列表
public function cate_list(){
$list = db('article_cat')->order('cat_rank ASC')->paginate(2);
print_r($list);
$this->assign('list',$list);
return $this->fetch();
}打印输出:think\paginator\driver\Bootstrap Object
(
[simple:protected] =>
[items:protected] => think\Collection Object
(
[items:protected] => Array
(
[0] => Array
(
[id] => 2
[cat_name] => aaa
[cat_rank] => 0
)
[1] => Array
(
[id] => 3
[cat_name] => bbb
[cat_rank] => 0
)
)
)
[currentPage:protected] => 1
[lastPage:protected] => 2
[total:protected] => 4
[listRows:protected] => 2
[hasMore:protected] => 1
[options:protected] => Array
(
[var_page] => page
[path] => /index.php/admin/Article/cate_list
[query] => Array
(
)
[fragment] =>
[type] => bootstrap
[list_rows] => 15
)
)到底咋用嘛,手册上说用法不变 最佳答案