Welcome Guest, Not a member yet? Register   Sign In
Is it okay to leave a controller without a view?
#4

[eluser]rvillalon[/eluser]
Come to think about it, here's a better approach: Dynamically return file types through CI. This way, error logging can happen server-side.

For example,

http://www.mywebsite.com/request/xml/file_name

would return an XML file

Whereas,

http://www.mywebsite.com/request/image/file_name

returns an image file.

I could do this by making use of Header. ie: Header('Content-type: image/png'); If there's an issue loading the file, I can log the error then.

LOL Sorry for not thinking ahead!


Messages In This Thread
Is it okay to leave a controller without a view? - by El Forum - 09-24-2009, 12:35 AM
Is it okay to leave a controller without a view? - by El Forum - 09-24-2009, 12:40 AM
Is it okay to leave a controller without a view? - by El Forum - 09-24-2009, 02:02 AM
Is it okay to leave a controller without a view? - by El Forum - 09-24-2009, 02:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB