index function with optional parameter |
[eluser]PermanaJ[/eluser]
I have a controller like this : Code: class Profile extends Controller{ The code above, when I open http://localhost/myapp/index.php/profile, it will list all user but when I open http://localhost/myapp/index.php/profile/23 it return 404 page not found How can I make when visitor open http://localhost/myapp/index.php/profile, it will list all profile. But when visitor open http://localhost/myapp/index.php/profile/23, it will show the detail of profile with Profile ID 23. Is it possible to do this without using routes ? |
Messages In This Thread |
index function with optional parameter - by El Forum - 04-03-2009, 08:07 PM
index function with optional parameter - by El Forum - 04-03-2009, 08:34 PM
index function with optional parameter - by El Forum - 04-04-2009, 03:44 AM
index function with optional parameter - by El Forum - 04-04-2009, 11:16 AM
index function with optional parameter - by El Forum - 04-04-2009, 06:25 PM
index function with optional parameter - by El Forum - 04-04-2009, 06:51 PM
index function with optional parameter - by El Forum - 04-04-2009, 06:57 PM
|