compatibilité Windows 
 De Nicolas Stienne - Jeudi 13 Juin 2002 à 10:08

Bonjour, j'ai testé ton script.
Pour le faire fonctionner sous Windows, j'ai ajouté b dans le fopen en plus du r dans l'option.
Maintenant, ça fonctionne avec Netscape.
En revanche, avec IE, c'est la page de test et non le fichier qui est téléchargée... d'où celà peut-il venir ?

Merci

Nicolas !!

  Re: compatibilité Windows 
 De Sébastien Crocquesel - Lundi 17 Juin 2002 à 20:15

Voici les headers que je fais et ca marche sous windows
les variables sont :
- $NomFichier : le nom proposé (moi je fais un basename($file_à_telecharger))
- $taill : la taille en octet (moi je fais un size($file_à_telecharger))

header("Content-Type: application/force-download; name=\"$NomFichier\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $taille");
header("Content-Disposition: attachment; filename=\"$NomFichier\"");
header("Expires: 0");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");


@+ et bon courage à tous