CodeIgniter Forums
URI help - 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: URI help (/thread-54425.html)



URI help - El Forum - 09-07-2012

[eluser]agammill[/eluser]
My segment doesn't want to work? I've tried different numbers, and I've tried different parts of the URL.

The URL for the page shows this...

http://www.mywebsite.com/test/create
which comes from the controller test

In the library...
In the function_constructor...
Code:
$this->CI =& get_instance();

In the find function...
Code:
if($this->CI->uri->segment(2) == 'create'){ //also tried (1) == 'test'
//this never triggers
}else{
//this always runs
}



URI help - El Forum - 09-07-2012

[eluser]Aken[/eluser]
Well what does the segment call actually return? Is your construct method properly formatted and is being called?


URI help - El Forum - 09-07-2012

[eluser]agammill[/eluser]
Opps! Got it. It was returning something completely different.