Forum Moderators: coopster
How do I delete these files after download? Or, how do I force a download to the user so that I can automatically delete the files? I know that some sites I have used, when you download a file it automatically opens a directory window on my computer and the file is in it.
Anyway, I am at a loss. These files are large and I don't need them filling up the server.
Any and all help GREATLY appreciated!
RC
I believe the unlink [uk.php.net] function is what you are looking for.
if (file_exists($file))
{
unlink ($file);
}
dc
What I really need is a way to know that the file has been downloaded. But I now believe this is impossible.
I'm thinking of writing a background script that deletes these files every so often, but could catch someone during the download and mess it up. Quite the pickle!
RC