RE: [PHP] deletion of temp files

From: Date: Tue, 10 Jul 2001 23:49:44 +0000
Subject: RE: [PHP] deletion of temp files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57265@lists.php.net to get a copy of this message
One way to do this is to create a special directory in htdocs reserved only for temporary files. Add the following line to crontab or a user with permissions to delete: 0 * * * * find /usr/local/apache/sitename/htdocs/specialdir/ -cmin +1440 -exec -rm -f {} Every hour this script will delete all files in specialdir over 24 hours old. Just make sure you use the right directory name :) I like this approach best because it doesn't add a bunch of overhead to any of the session scripts. -----Original Message----- From: Anurag Bhalla [mailto:anuragbhalla@yahoo.com] Sent: Monday, July 09, 2001 2:11 AM To: php-general@lists.php.net Subject: [PHP] deletion of temp files Hi list In my application,I need to generate some files for each user who comes to my site.These files need to be deleted once the user logs off. Pls suggest some way to delete these files once the user logs off ; perhaps with the use of sessions Regards Anurag

« previous php.general (#57265) next »