HelloCSE/resources/views/download.blade.php
2024-04-10 13:56:22 +02:00

14 lignes
Pas d'EOL
470 o
PHP

<?php
if($allowed){
header('Content-Type:'.$MIMEType);
header('Content-Length: '. $size);
header('Content-disposition: attachment; filename='. $fileName);
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
readfile($path);
}
else{
echo 'Téléchargement impossible ou non autorisé';
}