Un modo semplice per eseguire il download di un file è:
$nomeFile ="Nome del file.estensione";

$percorso ="../downloads/".$nomeFile;
$dimensione =filesize($percorso);

header("Content-Type: Application/octet-stream");
header("Content-Length: " . $dimensione);
$agent = $_SERVER ["HTTP_USER_AGENT"];
if (is_int(strpos($agent,"MSIE")) || is_int(strpos($agent,"Chrome"))) {
# Remove reserved chars: :\/*?"<>|
$nf = preg_replace('/[:\\x5c\\/*?"<>|]/','_',$nomeFile);
# Non-standard URL encoding:
header("Content-Disposition: attachment; filename=" . rawurlencode($nf));
} else if (is_int(strpos($agent,"Gecko"))) {
# RFC 2231:
header("Content-Disposition: attachment; filename*=UTF-8''" . rawurlencode($nomeFile));
} else if (is_int(strpos($agent,"Opera"))) {
# Remove reserved chars: :\/*{?
$nf = preg_replace('/[:\\x5c\\/{?]/','_',$nomeFile);
# RFC 2231:
header("Content-Disposition: attachment; filename*=UTF-8''" . rawurlencode($nf));
} else {
# RFC 2616 ASCII-only encoding:
$nf = mb_convert_encoding($nomeFile,"US-ASCII","UTF-8");
$nf = ( string ) str_replace("\\","\\\\",$nf);
$nf = ( string ) str_replace("\"","\\\"",$nf);
header("Content-Disposition: attachment; filename=\"$nf\"");
}
readfile($percorso);