mahfooz Posted December 8, 2009 Share Posted December 8, 2009 Hi, i want to delete a file from my server after if downloads successfully, e,g; a user want to download a file 012595.zip from the server, when it finished downloading, then script automatically delete 012595.zip from the server, how can i do this??? Link to comment https://forums.phpfreaks.com/topic/184363-delete-file-after-downloading/ Share on other sites More sharing options...
cags Posted December 8, 2009 Share Posted December 8, 2009 Depends exactly how you go about sending the file. If you use readfile it will return FALSE if an error occurs, you can then use unlink to delete the file. Link to comment https://forums.phpfreaks.com/topic/184363-delete-file-after-downloading/#findComment-973309 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.