readfile($file_path);
Io l'ho eliminata e funziona tutto ugualmente.
$filename = $_GET['cod'] ;
$file_path = $absolute_path . '../download/' . $filename;
if (file_exists($file_path)) {
$size = filesize($file_path);
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header("Content-type: application/octet-stream");
header("Content-length: " . $size);
//header('Content-Type: ' . $mime_type);
header('Expires: ' . $now);
header('Content-Disposition: attachment; filename="' . $filename . '"');
header('Pragma: no-cache');
header("Content-Transfer-Encoding: binary");
readfile($file_path);
exit();
}
ALe