Erreur php je ne comprend pas pourquoi !

Résolu
bonsoir
alors voila j'ai le code suivant qui me permet de télécharger un fichier en php:
<?php
$file ="txt.exe";
$url = "http://www.xxxxx.xx/test/txt.exe";
Header("Content-Disposition: attachment; filename=" . $file);
Header("Content-Type: application/force-download");
Header("Content-Transfer-Encoding: binary");
Header("Pragma: no-cache");
Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
Header("Expires: 0");
readfile($url);
?>


seulement le probleme c'est que e fichier télécharger et vide enfin il y a une erreur php dedans :

<br />
<b>Warning</b>:  readfile(http://www.xxxxx.xx/test/txt.exe) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: HHTTPrequest failed! HTTP/1.0 404 Not Found
 in <b>D:\production web\downloadfree.php</b> on line <b>10</b><br />


avez vous un solution ?
Configuration: Windows XP SP3 PRO /UBUNTU
Firefox 3.5.3
Thunderbird 2.0.0.21
Adobe Dreamweaver CS4
Adobe Flash CS4
Adobe Photoshop CS4
Adobe Firework CS4
FileZilla FTP Client
Php 5
MySQL serveur 5
Apache 2

2 réponses

  • Votes
  • Date
  • Date décroissante