What to return in controller |
If you accept the premise that a controller's ultimate purpose is to send output to browser then you need to decide what output is appropriate to the situation you describe.
One thought is to not do anything. PHP Code: public function show_post($id) Another thought is to return an error PHP Code: public function show_post($id) This produces a very sparse page showing only the error message. You could use CI's show_error function which outputs the standard error page. PHP Code: public function show_post($id) I would think the only questionable response is one that would give what is likely a hack attempt any clue as to why they got the output they did. |
Messages In This Thread |
What to return in controller - by romankubis - 10-18-2017, 12:39 AM
RE: What to return in controller - by dave friend - 10-18-2017, 07:48 AM
RE: What to return in controller - by romankubis - 10-18-2017, 09:20 AM
|