download.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. DOKEOS - elearning and course management software
  4. For a full list of contributors, see documentation/credits.html
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. See "documentation/licence.html" more details.
  10. Contact:
  11. Dokeos
  12. Rue des Palais 44 Paleizenstraat
  13. B-1030 Brussels - Belgium
  14. Tel. +32 (2) 211 34 56
  15. */
  16. /**
  17. * @package dokeos.survey
  18. * @author
  19. * @version $Id: download.php 10605 2007-01-06 17:55:20Z pcool $
  20. */
  21. $filename="temp/test.csv";
  22. header('Expires: Wed, 01 Jan 1990 00:00:00 GMT');
  23. header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
  24. header('Cache-Control: public');
  25. header('Pragma: no-cache');
  26. header('Content-Type: application/force-download');
  27. header('Content-Length: '.filesize($filename));
  28. header('Content-Disposition: attachment; filename='.$filename);
  29. readfile($filename);
  30. ?>