Delete file after downloaded |
[eluser]Guntars[/eluser]
I just need to create txt file for user, and then after file is downloaded. I want to delete it from server. Does anyone can help me with code, how to delete the file after file is downloaded successfully, I was look in google and can't find clean solution. How to create I know. Thanks.
[eluser]gao[/eluser]
Hello. You have to download the file with a PHP, so when the file were downloaded, you could make a unlink(). See http://w-shadow.com/blog/2007/08/12/how-...-with-php/ for example for PHP or see Download Helper
[eluser]pistolPete[/eluser]
If it's just a plain text file, you don't need to create an actual file. Just generate the content and use the download helper: user guide Code: // generate the content, use a model function or whatever
|
Welcome Guest, Not a member yet? Register Sign In |