Pagination library in codeigniter -


this config:

$config['pagination'] = array(      'page_query_string' => true,     'query_string_segment' => 'page',     'full_tag_open' => '<div id="page_footer">',     'full_tag_close' => '</div>',     'anchor_class' => 'class="pagecurrent"',     //'next_link' => '&raquo;',     //'prev_link' => '&laquo;',     'use_page_numbers' => true,     'last_link' => 'trang cuối',     'first_link' => 'trang đầu',     'num_links' => 4, ); 

controller:

$this->pagination->initialize(                     array_merge(                         $this->config->item('pagination'),                         array(                             'total_rows' => $this->_data['total_quizs'],                             'per_page' => be_quiz_per_page,                             'base_url' => base_url()                         )                     )                 );                 $this->_data['pageination'] = $this->pagination->create_links(); 

when run it, got link:

http://quiz.com/&page=2

link wrong, should have http://quiz.com/?page=2, edit base_url config become

base_url() . '? '

it's work well, when click page 2, link go page 1 become http://quiz.com/?&page=2?&page=

i update new version ci. way, want ask question, want use page_query_string case http://quiz.com?page=x, how config this.

true $config['page_query_string'] = true; , add

base_url()."?a=1"; time being want.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -