1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <?php
if (isset($_GET["filename"]))
{
$filename=$_GET["filename"];
// Envoi du fichier
header('Content-Transfer-Encoding: none');
header('Content-Type: application/octetstream; name="'.$filename.'"');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-length: '.filesize($filename));
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public");
header("Expires: 0");
@readfile($filename) OR die();
}
?> |
Partager