Expand|Select|Wrap|Line Numbers
- $file_path = '/var/tmp/up2606.csv';
- header('Cache-Control: public, must-revalidate');
- header('Pragma: hack');
- header('Content-Type: application/vnd.ms-excel');
- header('Content-Length: '.(string)(filesize($file_path)));
- header('Content-Transfer-Encoding: binary\n');
- header('Content-Disposition: attachment; filename="recv_data.csv"');
- readfile($file_path);
- unlink($file_path);
- ?>
The script completely ignores the unlink though, as my /var/tmp directory still has all the files that are generated... the funny thing is I'm not getting any errors, so I'm not quite sure how to go about solving this one?