CI(6)

ci框架的分页

$this->load->model("testmodel");

$result = $this->testmodel->test_get();

$total_rows = count($result);

$pagenum = 3;

$config['base_url'] = "/ci/index.php/test/get";

$config['total_rows'] = $total_rows;

$config['per_page'] = $pagenum; 

$config['use_page_numbers']=true;


$this->load->library("pagination");

$this->pagination->initialize($config); 

//echo $this->pagination->create_links();


$id=$id?$id:1;

$start=($id-1)*$pagenum;

$list=$this->testmodel->user_select_limit($start,$pagenum);

//print_r($list);

$arr['list'] = $list;

$this->load->view("test/get.php",$arr);

上一篇:RestTemplate---Spring提供的轻量Http Rest 风格API调用工具


下一篇:ant design for vue 关于table的一些问题