Afficher un message
Vieux 22/08/2007, 14h30   #2
P'tit Marcel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Probleme lecture de fichier

Salut,

barfi a écrit :
> $fd = fopen($filepath, "rb");
> $torrent = fread($fd, filesize($filepath));
> fclose($fd);
> header("Content-Type: application/x-bittorrent");
> header('Content-Disposition: attachment; filename="'.$f.'.torrent"');
> print($torrent);
> il m'est possible de télécharger un fichier .torrent mais, celui-ci
> semble incomplet..


Plutôt que le fopen/fread/fclose/print, tu pourrais coder
readfile($filepath);

ou bien essaye d'ajouter cet entête :
header("Content-Length: ".strlen($torrent));


(sans garantie)
--
P'tit Marcel
stats sur les forums modérés http://www.centrale-lyon.org/ng/
  Réponse avec citation
 
Page generated in 0,07466 seconds with 9 queries