Monday, February 20, 2012

Pasing parameter to default controller

To pass parameter to index of this controller?
i.e. http://example.com/param1/param2

in the
public function index()
{
$param1 = $this->uri->segment(1);
$param2 = $this->uri->segment(2);

}

Simple solution
Thank you sir for I got it solved with this simple thing

folder - frontarea
controller - frontpage
function - somefunction

$route['(:any)'] = "frontarea/frontpage/somefunction/$1";

No comments: