public function search($offset = 0)
{
$this->load->library('pagination');
$per_page = 5;
$count = $this->db->count_all_results('ghost_projects');
$config['base_url'] = base_url().'project/search';
$config['total_rows'] = $count;
$config['per_page'] = $per_page;
$config['first_url'] = '1';
$config['cur_page'] = '1';
$config['num_links'] = 5;
$config['cur_tag_open'] = '';
$config['cur_tag_close'] = '';
$this->pagination->initialize($config);
$this->data['projects'] = $this->addproject_m->ongoingprojects($per_page, $offset);
$this->data['subview'] = 'project/search';
$this->load->view('_layout_main_1', $this->data);
这是我控制器中的代码,我已经指定了每页所需的条目,但它显示了10个条目,有人可以告诉我我的代码有什么问题吗?
我在视图中添加了创建链接功能,感谢任何帮助,谢谢:)