I am working on the codeigniter as a beginner,, and got this problem.. I cannotload the Pagination Library...
Here is the code
<?php
/**
*
*/
class Site extends CI_Controller
{
public function index() {
if($this->load->library('pagination')) {
echo "load success";
}
else {
echo "load failed";
}
$config['base_url'] = 'http://localhost/ci_pagination/index.php/site/index';
$config['total_rows'] = $this->db->get('data')->num_rows();
$config['per_page'] = 10;
$config['num_links'] = 20;
$this->pagination->initialize($config);
echo $this->pagination->create_links();
$data['records'] = $this->db->get('data', $config['per_page'], $this->uri->segment(3));
$this->load->view('site_view', $data);
}
}
?>
I even tried autoloading pagination library.. But still it is echoing 'Load Failed' . CAN SOMEBODY HELP ME???????? plzzzzzz