我的codeigniter控制器遇到问题,此分页代码工作不正常:
function index()
{
$data['title'] = "Hope Center - Home";
$config['base_url'] = base_url().'Home';
$config['total_rows'] = $this->donation_model->get_search_count();
$config['per_page'] = 3;
$config['uri_segment'] = 3;
$config['full_tag_open'] = '<ul class="pager">';
$config['full_tag_close'] = '</ul>';
$config['num_tag_open'] = '<li class="rounds">';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li class="rounds active"><a class="page-link" href="#">';
$config['cur_tag_close'] = '</a></li>';
$config['next_tag_open'] = '<li class="next">';
$config['next_tagl_close'] = '</a></li>';
$config['prev_tag_open'] = '<li class="previous">';
$config['prev_tagl_close'] = '</li>';
$config['first_tag_open'] = '<li class="rounds disabled">';
$config['first_tagl_close'] = '</li>';
$config['last_tag_open'] = '<li class="rounds">';
$config['last_tagl_close'] = '</a></li>';
$config['attributes'] = array('class' => 'page-link');
$this->pagination->initialize();
$data['donation_info'] = $this->donation_model->get_donation_info($config['per_page'],$this->uri->segment(3));
$this->load->view('frontend/layouts/header',$data);
$this->load->view('frontend/home',$data);
$this->load->view('frontend/layouts/footer');
}
我已经在上面添加了完整的控制器功能代码。
暂无答案!
目前还没有任何答案,快来回答吧!