Welcome Guest, Not a member yet? Register   Sign In
using the 1st segment of the url
#1

[eluser]xeroblast[/eluser]
we all know that the 1st segment of the URL is the controller name like "http://domain.com/controller/method/params"...

how can i make the 1st segment in the URL be a data of the controller?

i.e.

http://domain.com/foo

and in the controller

Code:
function index($bar=NULL) {
if ($bar) {
  echo $bar; // display 'foo'
} else {
  echo 'blah';
}
}


Messages In This Thread
using the 1st segment of the url - by El Forum - 03-11-2010, 06:06 AM
using the 1st segment of the url - by El Forum - 03-11-2010, 09:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB