NaszvadiG
4/17/2014 - 8:38 AM

ci_uri_info.md

CodeIgniter - Working with URL Params

Target a Specific Value

$this->uri->segment(n); // n=1 for controller, n=2 for method, etc

Using the Router Class

//-------------------------------------
//! Get Controller Name 
//------------------------------------- 
$this->router->fetch_class();

//-------------------------------------
//! Get Method Name 
//------------------------------------- 
$this->router->fetch_method();

//-------------------------------------
//! Get Module Name in HMVC
//------------------------------------- 
$this->router->fetch_module();