0) { $file = $_REQUEST["f"]; $destinazione = $_REQUEST['p']; if ($destinazione == "") { $percorso = ROOT_UPLOAD_PREPARAZIONE . $file; } elseif ($destinazione == "ce") { $percorso = ROOT_UPLOAD_REVISORE . $file; } else { $percorso = ROOT_UPLOAD_EROGAZIONE . $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"; } } else { echo "il file: " . $file . " non esiste"; }