CodeIgniter Forums
Problems trying to load libraries on my controllers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Problems trying to load libraries on my controllers (/thread-29719.html)



Problems trying to load libraries on my controllers - El Forum - 04-19-2010

[eluser]Unknown[/eluser]
Hi all, i have a little problem trying to charge some libraries on my controller, one of that is using pagination library, i have the basic code :
Code:
$this->load->library('pagination');

$config['base_url'] = 'http://example.com/index.php/test/page/';
$config['total_rows'] = '200';
$config['per_page'] = '20';

$this->pagination->initialize($config);

echo $this->pagination->create_links();

But this code show me an error when i try to use initialize() : Call to a member function on a non-object

The same problem with database library, but curiously, this don't occur with url helper or with my own libraries.

BUT if i put this libraries (pagination, databese) in autoload.php ALL RUNS FINE!.
Some idea about that? TNX!!