chunk.php
11 years ago
config.php
11 years ago
download.php
11 years ago
handler.php
11 years ago
helper.php
11 years ago
input.php
11 years ago
nested.php
11 years ago
render.php
11 years ago
session.php
11 years ago
upload.php
11 years ago
download.php
39 lines
| 1 | <?php |
| 2 | |
| 3 | class PMXI_Download |
| 4 | { |
| 5 | |
| 6 | static public function zip($file_name) |
| 7 | { |
| 8 | |
| 9 | header('Content-type: application/zip'); |
| 10 | header("Content-Disposition: attachment; filename=\"".basename($file_name)."\""); |
| 11 | readfile($file_name); |
| 12 | die; |
| 13 | } |
| 14 | |
| 15 | static public function xls($file_name) |
| 16 | { |
| 17 | header("Content-Type: application/vnd.ms-excel; charset=UTF-8"); |
| 18 | header("Content-Disposition: attachment; filename=\"".basename($file_name)."\""); |
| 19 | readfile($file_name); |
| 20 | die; |
| 21 | } |
| 22 | |
| 23 | static public function csv($file_name) |
| 24 | { |
| 25 | header("Content-Type: text/plain; charset=UTF-8"); |
| 26 | header("Content-Disposition: attachment; filename=\"".basename($file_name)."\""); |
| 27 | readfile($file_name); |
| 28 | die; |
| 29 | } |
| 30 | |
| 31 | static public function xml($file_name) |
| 32 | { |
| 33 | header("Content-Type: application/xhtml+xml; charset=UTF-8"); |
| 34 | header("Content-Disposition: attachment; filename=\"".basename($file_name)."\""); |
| 35 | readfile($file_name); |
| 36 | die; |
| 37 | } |
| 38 | |
| 39 | } |