
Forum » » Le coin des codeurs » » Forcer le téléchargement d'un fichier - problème
Posté : 22-01-2006 21:24 
<?php
$file = "../dossier/fichier.txt";
$filename = basename($file);
header("!content-type:! application/force-download");
header("!content-disposition:! attachment; filename= ont color="#007700">\" $filename\"");
readfile("$file");
?>
On va chercher le dossier dossier dans le dossier parent.
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=19052&forum=5