[DONE] Passing arguments to controller. |
[eluser]Unknown[/eluser]
Maybe this is a very basic question but i canĀ“t find information for this. How i show a 404 error when i have done a controller that receive arguments but if you dont send arguments, how to show the 404? example www.myexample.com/user/58 -> argument 58 www.myexample.com/user -> no argument.. Code: funcion User($id) i want to show_404() when there are no arguments but codeigniter says: Argument is missing... What i can do?? Excuse me, maybe this is a very very basic question, i dont found nothing about this in the guide.. Really thanks codeigniter community!! Sorry if my english is not good. ///////////////////////////////////// EDIT: sorry my own error. This form for correct this " stupid " mistake is : when declaring function: Code: function User($user = ''){ Writting '' prevent that. Excuse me again. Thanks. |
Messages In This Thread |
[DONE] Passing arguments to controller. - by El Forum - 01-05-2012, 07:12 AM
|