<?php
class Books extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper( url );
}
function index() {
// load pagination class
$this->load->library( pagination );
$config[ base_url ] = base_url(). books/index/ ;
$config[ total_rows ] = 2;
$config[ per_page ] = 5 ;
$config[ full_tag_open ] = <p> ;
$config[ full_tag_close ] = </p> ;
$this->pagination->initialize($config);
echo $this->pagination->create_links();
}
}
?>
create_links();功能似乎不起作用。我没有得到任何错误,但它只是返回一个空白字符串。我都试过了http://blip.tv/nettuts/codeigniter-from-scratch-day-7-2690301和http://godbit.com/article/pagination-with-code-igniter教程。
I m aware the documentation says http://codeigniter.com/user_guide/libraries/pagination.html The create_links() function returns an empty string when there is no pagination to show.
but so how do I fix that?
Thanks you!
区块报价