| 
 Posted by Collector on 09/01/06 06:49 
Hi guys, 
 
Is there any way how to delete a file after download headers have been 
sent? This code does not work for some reason. 
 
header('Content-type: application/xml'); 
header('Content-Transfer-Encoding: binary'); 
header('Content-length: '.filesize($f)); 
header('Content-Disposition: attachment; filename="'.basename($f).'"'); 
 
if($fp = fopen($f, "rb")) 
{ 
while ($buffer = fread($fp, filesize($f))) print $buffer; 
fclose($fp); 
} 
 
unlink($f); 
 
 
--  
Collector 
------------------------------------------------------------------------ 
Collector's Profile: http://techiegroups.com/member.php?userid=264 
View this thread: http://www.techiegroups.com/showthread.php?t=115692
 
  
Navigation:
[Reply to this message] 
 |