Welcome Guest, Not a member yet? Register   Sign In
force_download + CI 1.6.0
#3

[eluser]Digitalman65[/eluser]
[quote author="Derek Allard" date="1208487528"]I like this suggestion, and its been incorporated into CI. Thanks.[/quote]


I wish it had been made an optional argument because I need to do some processing after the force_download but can't. For instance, after the force_download, I want to delete the file. Since processing stops at this point, I can't use force_download.

I'm making it an argument in my copy of CI. Unfortunately my copy of CI will now be out of sync with the official CI; not something I enjoy having, I must say.

function force_download($filename = '', $data = '', $exit_now = TRUE)
:
:
if ($exit_now)
{
exit($data);
}
else
{
echo ($data);
}
}


It's just very important that the developer doesn't produce any additional output after force_download otherwise it will corrupt the file data being downloaded.


Messages In This Thread
force_download + CI 1.6.0 - by El Forum - 04-17-2008, 02:24 PM
force_download + CI 1.6.0 - by El Forum - 04-17-2008, 03:58 PM
force_download + CI 1.6.0 - by El Forum - 08-22-2008, 10:16 AM
force_download + CI 1.6.0 - by El Forum - 08-22-2008, 10:44 AM
force_download + CI 1.6.0 - by El Forum - 08-22-2008, 10:46 AM
force_download + CI 1.6.0 - by El Forum - 10-21-2010, 02:22 AM
force_download + CI 1.6.0 - by El Forum - 11-04-2010, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB