![]() |
PHP Guru
How do you delete a file once it has been downloaded ?
I don't want to store the name of the file in a list and have a other script deleting the file every hour. I want to delete the file as soon as the download is done. How can I do this ? |
unlink("$filename");
|
What's up with the quotes around the variable name?
|
You miss understound my question ... I know how to unlink a file... there is just no event called on download completion...
I don't know where to call the unlink function |
why not just print out the the content of the file, then delete it?
|
hummm seems like an interresting idea ... but how do you print out the content of a file to start a download ?
|
usually move_uploaded_file() work for me when working with file uploads
another way of doing it, if unlink doesnt do it for you, is to delete file through shell access, look in to shell_exec() or exec() |
All times are GMT -7. The time now is 10:49 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123