Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
21 righe
688 B
21 righe
688 B
<?php |
|
exit(); |
|
include_once "../lib/api.php"; |
|
$file = $_REQUEST["f"]; |
|
$percorso = ROOT_UPLOAD_ALLEGATI . $file; |
|
if (file_exists($percorso)) { |
|
header('Content-Description: File Transfer'); |
|
header('Content-Type: application/octet-stream'); |
|
header('Content-Disposition: attachment; filename=' . Utils::GetValidFilename($file)); |
|
header('Content-Transfer-Encoding: binary'); |
|
header('Expires: 0'); |
|
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
|
header('Pragma: public'); |
|
header('Content-Length: ' . filesize($percorso)); |
|
ob_clean(); |
|
flush(); |
|
readfile($percorso); |
|
exit; |
|
} else { |
|
echo "il file: " . $file . " non esiste"; |
|
} |