数据分页:

        $Data = M('Channel'); // 实例化Data数据模型
        
        
        $content = $Data->page($page, 4)->select();
        $totalCount = $Data->count();


        $this->assign('contents', $content);
        $this->assign('totalPageCount', $totalCount);

        $this->display();

视图:

            <volist name="contents" >
            {$vo.id}--{$vo.title}<br/>
            </volist>
            {:getPagination($totalPageCount,4)}

 

相关文章:

  • 2021-06-07
  • 2021-08-14
  • 2021-12-08
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
猜你喜欢
  • 2021-11-24
  • 2022-01-07
  • 2022-03-02
  • 2022-12-23
  • 2021-08-13
  • 2021-05-17
  • 2022-12-23
相关资源
相似解决方案