Welcome Guest, Not a member yet? Register   Sign In
uri segment problem


i am having problem with using uri segment.

in my app, i want to execute a code when $this->uri->segment(1) has a value. and another code when it is not provided.

i have written the code, but the condition when segment(1) is not provided is never being satisfied, have tried all possibilities...

need your time and suggestions... in a hurry !!! Sad

If you take a look to http://ellislab.com/codeigniter/user-gui...s/uri.html you'll see that segment(1) is the controller name and segment(2) is the method name.

In a normal scenario segment(2) can be empty in which case it points to the controller's index() method and segment(1) when the controller is the default one (Default or set from config).

Theme © iAndrew 2016 - Forum software by © MyBB