|
控制器代码如下
function employeelist(){
$this->load->library('pagination');
$list=array();
$data['base']=$this->base;
$data['tabcss']=$this->config->item('tabcss');
$data['adminjs']=$this->config->item('adminjs');
$config['base_url'] = site_url('92back/cadmin/employeelist');
$config['per_page'] = 20;
$config['uri_segment'] = 4;
$page = intval($this->uri->segment(4));
$data['list']=$this->Mindex->memployeelist($config['per_page'],$page); //员工列表 模型
$config['total_rows'] = count($data['list']); //可以正确返回数量
$this->pagination->initialize($config);
$data['showpage'] = $this->pagination->create_links();
echo $data['showpage'];
print_r($data['list']);
//$this->load->view('vadmin/employeelist',$data);
}
这样写就是不显示分页,找了半天也没找到原因,没法了,在这里求助! |
|