CodeIgniter Forums
Uri class is missing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Uri class is missing (/showthread.php?tid=63818)



Uri class is missing - rymesaint - 12-11-2015

i want to use pagination class but  the uri class is missing from system library.
i've tried to download it again but i cannot find it either.


RE: Uri class is missing - pdthinh - 12-11-2015

(12-11-2015, 05:43 PM)rymesaint Wrote: i want to use pagination class but  the uri class is missing from system library.
i've tried to download it again but i cannot find it either.

The full path of it is system/core/URI.php


RE: Uri class is missing - rymesaint - 12-14-2015

oh right, but when i try using the segment it's always give me 0?


RE: Uri class is missing - ciadmin - 12-14-2015

Show your code - how are you trying to use the Uri class, and what is giving you an error.


RE: Uri class is missing - rymesaint - 12-16-2015

(12-14-2015, 11:44 PM)ciadmin Wrote: Show your code - how are you trying to use the Uri class, and what is giving you an error.

Here's my code :
Code:
$config['base_url'] = 'http://localhost/codeigniter/anime/page/';
$config['total_rows'] = $this->episode_model->count_all();
$config['per_page'] = 4;


$this->pagination->initialize($config);
$page = $this->uri->segment(3);

$info['anime'] = $this->episode_model->select_all($config['per_page'],$page);

$this->load->view('header', $data);
$this->load->view('content', $info);
$this->load->view('footer', $data);