note 32109 added to function.readfile
| From: | jd2bs at hotmail dot com | Date: | Sat, 17 May 2003 01:36:46 +0000 |
| Subject: | note 32109 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-48123@lists.php.net to get a copy of this message | ||
Hi guys,when I using readfile() to download some *.msi files at client PC with win2000 OS and
NetScape6/7 browser ,I found it doesn't work well.
the error message is "warning :readfile("http//..../a.msi")-No Such File or
Directory".or"warning :readfile("/www/htdocs/..../a.msi")-No Such File or
Directory"
In fact,the file is exist.because it work well when browser is Netscape 4.x , at this time I using
readfile('/www/htdocs/.../a.msi').but if path is "http://.../a.msi",Netscape4.x can't work
neither.
my code as below:
<?
$url="http://192.168.0.4/down/a.msi";
$path="/www/htdocs/down/a.msi";
Header("Content-type: application/octet-stream");
Header("Content-Disposition: attachment; filename=a.msi");
readfile($url);
//readfile($path);
?>
--
http://www.php.net/manual/en/function.readfile.php
http://master.php.net/manage/user-notes.php?action=edit+32109
http://master.php.net/manage/user-notes.php?action=delete+32109
http://master.php.net/manage/user-notes.php?action=reject+32109