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:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 2:11 AM
To: [EMAIL PROTECTED]
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]