Last change
on this file since 20312 was
18973,
checked in by mistic100, 12 years ago
|
small code cleaning, use mkgetdir(), add missing language string
|
File size:
734 bytes
|
Rev | Line | |
---|
[16379] | 1 | <?php |
---|
| 2 | define('PHPWG_ROOT_PATH', '../../'); |
---|
| 3 | include(PHPWG_ROOT_PATH.'include/common.inc.php'); |
---|
| 4 | |
---|
[16948] | 5 | check_status(ACCESS_GUEST); |
---|
[16379] | 6 | |
---|
[16609] | 7 | try { |
---|
| 8 | $BatchDownloader = new BatchDownloader($_GET['set_id']); |
---|
| 9 | $file = $BatchDownloader->getArchivePath(); |
---|
[16379] | 10 | |
---|
[16609] | 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).''); |
---|
[16379] | 16 | |
---|
[16609] | 17 | header('Cache-Control: no-cache, must-revalidate'); |
---|
| 18 | header('Pragma: no-cache'); |
---|
| 19 | header('Expires: 0'); |
---|
[16379] | 20 | |
---|
[16609] | 21 | readfile($file); |
---|
| 22 | } |
---|
| 23 | catch (Exception $e) |
---|
| 24 | { |
---|
| 25 | echo $e->getMessage(); |
---|
| 26 | } |
---|
[18973] | 27 | |
---|
[16379] | 28 | exit(0); |
---|
| 29 | |
---|
| 30 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.