Salut!
Moi j'ai ça:
$file = basename( $path );
header("Content-disposition: attachment; filename=$file");
header('Content-Type: application/force-download');
header("Content-Transfer-Encoding: application/octet-stream\n");
header('Content-Length: ' . filesize($path) );
header('Pragma: no-cache');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0, public');
header('Expires: 0');
readfile( $path );
Ou $path est le chemin complet ( dossier + nom du fichier )
@++
R@f
www.allpotes.ch: Photos, humour, vidéos, gags, ...
"On dit que seulement 10 personnes au monde comprenaient Einstein. Personne ne me comprends. Suis-je un génie???"