GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP Guru (https://gfy.com/showthread.php?t=550482)

qw12er 12-10-2005 02:47 PM

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 ?

nolaman 12-10-2005 02:51 PM

unlink("$filename");

nakki 12-10-2005 03:06 PM

What's up with the quotes around the variable name?

qw12er 12-10-2005 03:18 PM

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

woj 12-10-2005 04:35 PM

why not just print out the the content of the file, then delete it?

qw12er 12-10-2005 04:44 PM

hummm seems like an interresting idea ... but how do you print out the content of a file to start a download ?

Serge Litehead 12-10-2005 05:35 PM

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