problem retrieving uri segments using $this->uri->segment() |
[eluser]mobilizedesign[/eluser]
when i try to assign a value to a variable like this ... Quote:$variable = $this->uri->segment(n); i get nothing. when i make a slight change ... Quote:$variable = $this->uri->segment(n,0); i get the FALSE value ( 0 in this case ) my nav links are setting the uri like this ... http://www.domain.com/codeigniter/index....lections/n why am i unable to access uri using segments()? is this related to the routes.php file? is $this->uri->segment(n,0) incompatible when using QUERY_STRING config?
[eluser]mobilizedesign[/eluser]
changed the $config['uri_protocol'] to Code: $config['uri_protocol'] = "REQUEST_URI"; now segment() is behaving
[eluser]Cristian Gilè[/eluser]
If you are using re-reouted URI you have to use: Code: $this->uri->rsegment(n) not Code: $this->uri->segment(n) URI class is not compatible with QUERY_STRING |
Welcome Guest, Not a member yet? Register Sign In |