download.php 387 B

1234567891011
  1. <?
  2. $filename="temp/test.csv";
  3. header('Expires: Wed, 01 Jan 1990 00:00:00 GMT');
  4. header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
  5. header('Cache-Control: public');
  6. header('Pragma: no-cache');
  7. header('Content-Type: application/force-download');
  8. header('Content-Length: '.filesize($filename));
  9. header('Content-Disposition: attachment; filename='.$filename);
  10. readfile($filename);
  11. ?>