Welcome Guest, Not a member yet? Register   Sign In
Quick Question
#1

[eluser]Unknown[/eluser]
Hey there, downloaded CI about an hour ago and have been messing with it

Is there a way to set a 'default' function the same as __call() from php5? I tried but it wouldn't work. Basically is there a way to set a default function in the controller, but still have variables from the url, such as:

demo.com/user/Jack

Instead of calling a 'Jack' function, it'd call another one (say, User::ShowUser) and I'd be able to retrieve the name

The reason I ask is because having something like 'demo.com/user/profile/Jack' seems long. If there isn't a way I'll just go with that.
#2

[eluser]Unknown[/eluser]
Damn I'm blind. Found it here: http://ellislab.com/codeigniter/user-gui...uting.html




Theme © iAndrew 2016 - Forum software by © MyBB