temp file deletion strategies?

From: Date: Wed, 15 Nov 2000 07:07:25 +0000
Subject: temp file deletion strategies?
Groups: php.general 
Request: Send a blank email to php-general+get-25384@lists.php.net to get a copy of this message
If I send a temporary file to a client like this: $tempfile = create_file_somehow(...); header( "Content-type: application/octet-stream" ); header( "Location: $tempfile" ); What sort of strategies exist to make sure that the $tempfile gets deleted? Do I get control back after the second header executes? I'm thinking about situations where client-side caching is disabled and the same file needs to be created over and over (in my case, it will always have the same name each time it's created). Giving it a lifetime of an hour or so would be handy, but it needs to get deleted eventually. Thanks -David

« previous php.general (#25384) next »