Changeset 16609 for extensions/BatchDownloader/download.php
- Timestamp:
- Jul 11, 2012, 12:58:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/download.php
r16379 r16609 3 3 include(PHPWG_ROOT_PATH.'include/common.inc.php'); 4 4 5 //check_status(ACCESS_CLASSIC);5 check_status(ACCESS_CLASSIC); 6 6 7 $BatchDownloader = new BatchDownloader($_GET['set_id']); 8 $file = $BatchDownloader->getArchivePath(); 7 try { 8 $BatchDownloader = new BatchDownloader($_GET['set_id']); 9 $file = $BatchDownloader->getArchivePath(); 9 10 10 header('Content-Type: application/force-download; name="'.basename($file).'"');11 header('Content-Disposition: attachment; filename="'.basename($file).'"');12 header('Content-Description: File Transfer');13 header('Content-Transfer-Encoding: binary');14 header('Content-Length: '.filesize($file).'');11 header('Content-Type: application/force-download; name="'.basename($file).'"'); 12 header('Content-Disposition: attachment; filename="'.basename($file).'"'); 13 header('Content-Description: File Transfer'); 14 header('Content-Transfer-Encoding: binary'); 15 header('Content-Length: '.filesize($file).''); 15 16 16 header('Cache-Control: no-cache, must-revalidate');17 header('Pragma: no-cache');18 header('Expires: 0');17 header('Cache-Control: no-cache, must-revalidate'); 18 header('Pragma: no-cache'); 19 header('Expires: 0'); 19 20 20 readfile($file); 21 readfile($file); 22 } 23 catch (Exception $e) 24 { 25 echo $e->getMessage(); 26 } 27 21 28 exit(0); 22 29
Note: See TracChangeset
for help on using the changeset viewer.