Welcome Guest, Not a member yet? Register   Sign In
URI Mapping to another controller
#2

[eluser]douweegbertje[/eluser]

you have to understand that your controller works like this:


example.com/admin/

Code:
<?php

class Admin extends CI_Controller {
  
  
}

example.com/admin/users

Code:
<?php

class Admin extends CI_Controller {
  
  public function users()
  {
  //blaat
  }
  
}

and:
example.com/admin/users/10

Code:
<?php

class Admin extends CI_Controller {
  
  public function users($userId)
  {
  //blaat
  echo $userId;
// will result in echo 10
  }
  
}


Messages In This Thread
URI Mapping to another controller - by El Forum - 03-07-2012, 09:44 AM
URI Mapping to another controller - by El Forum - 03-07-2012, 09:56 AM
URI Mapping to another controller - by El Forum - 03-07-2012, 10:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB