Routing and URI parsing in Codeigniter
- by bobo
I have a route defined in CI,
$route['user/activate-account/:any'] = "user/activate_account";
People access the route in this url pattern,
http://mydomain.com/user/activate-account/user_id/12345/token/abcdefghijk
Inside the activate_account function, I tried to use the following codes to retrieve the required data,
$user_id=$this->input->get('user_id');
$token=$this->input->get('token');
But they return FALSE, does this mean that for this kind of url pattern, I am supposed to use the functions provided by the URI class (http://codeigniter.com/user_guide/libraries/uri.html) to retrieve the variables?