CodeIgniter Forums
Question: is it possible? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Question: is it possible? (/thread-1962.html)



Question: is it possible? - El Forum - 07-08-2007

[eluser]PoWah[/eluser]
Is it possible to reach uri segment from library?
Tried ..

Code:
$obj =& get_instance();
$uri = $this->obj->uri->segment(3);

.. but it's not working.


Question: is it possible? - El Forum - 07-08-2007

[eluser]ztinger[/eluser]
hmm

have you tried

Code:
$uri = $obj->uri->segment(3);

?


Question: is it possible? - El Forum - 07-08-2007

[eluser]OwanH[/eluser]
yea PoWah, $obj is the reference to the CodeIgniter object you are getting the instance of. So just leave off the $this-> part.