|
|
|
@ -21,14 +21,20 @@ function action_archive_mf_telecharger() {
|
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Vider tous les tampons pour ne pas provoquer de Fatal memory exhausted |
|
|
|
|
$level = @ob_get_level(); |
|
|
|
|
while ($level--) { |
|
|
|
|
@ob_end_clean(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Telechargement du fichier d'archive |
|
|
|
|
header('Content-Description: File Transfer'); |
|
|
|
|
header('Content-type: application/zip'); |
|
|
|
|
header('Content-type: application/octet-stream'); |
|
|
|
|
header('Content-Disposition: attachment; filename="' . basename($chemin_archive) . '"'); |
|
|
|
|
header('Content-Transfer-Encoding: binary'); |
|
|
|
|
header('Pragma: public'); |
|
|
|
|
header('Expires: 0'); |
|
|
|
|
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); |
|
|
|
|
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
|
|
|
|
header('Content-Length: ' . filesize($chemin_archive)); |
|
|
|
|
readfile($chemin_archive); |
|
|
|
|
} |
|
|
|
|