$records_per_page = 5; //每页显示 sql limit x,y的y $page=$request->param('page'); //页数参数 $start_offset=($page-1)*$records_per_page; // sql limit x,y的x $count=count($Cate_data); 总条数 $Cate_data=array_slice($Cate_data,$start_offset,$records_per_page); php割开数组等于sql limit x,y $pagination = new Zebra_Pagination(); 实例化 $pagination->records($count); 设置总条数 $pagination->records_per_page($records_per_page); 设置 $this->assign('zebra_page',$pagination->render(1)); 赋值模板 render(1);不直接输出; 在view层要引入zebra_pagination.css {$zebra_page}