CodeIgniter Forums
index method is "found" but other methods not. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: index method is "found" but other methods not. (/showthread.php?tid=51868)



index method is "found" but other methods not. - El Forum - 05-21-2012

[eluser]chubbypama[/eluser]
i am trying to query the url for variables.
i thought i could do something like:

Code:
$rot1=$this->uri->segment(0);
$rot2=$this->uri->segment(1);
$rot3=$this->uri->segment(2);

the url looks like:

Code:
http://localhost/myapp/mymethod/123/456/789

i would like the rot variables to contain 123, 456, 789 respectively.
thanks


index method is "found" but other methods not. - El Forum - 05-21-2012

[eluser]CroNiX[/eluser]
Segments start at 1.

http://localhost/myapp/mymethod/123/456/789

seg 1: myapp
seg 2: mymethod
seg 3: 123
seg 4: 456
seg 5: 789
etc.