note 82641 added to function.readfile
| From: | saidketchman at gmail dot com | Date: | Sun, 20 Apr 2008 00:06:33 +0000 |
| Subject: | note 82641 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138555@lists.php.net to get a copy of this message | ||
Well I have a solution for anyone who may have had the same problem as I did. Basically the problem
was that when trying to use external urls in readfile, or in general trying to use the http:// prefix, only a file placeholder would download in Internet Explorer 7 and
Safari (and possibly other browsers with the exception of Firefox).
So basically this is the how I solved the problem. If you are using the code for the
Content-Length:
header("Content-Length: ".filesize($filepath));
Then this is the issue. I don't know if it is with only certain servers, but in my case
Internet Explorer couldn't get a filesize so it decided to not download any of the file.
The solution was to simply remove this line and give it no filesize and then the browsers would
download the whole file.
----
Server IP: 64.71.164.2
Probable Submitter: 69.216.99.169
----
Manual Page -- http://www.php.net/manual/en/function.readfile.php
Edit -- https://master.php.net/note/edit/82641
Del: integrated -- https://master.php.net/note/delete/82641/integrated
Del: useless -- https://master.php.net/note/delete/82641/useless
Del: bad code -- https://master.php.net/note/delete/82641/bad+code
Del: spam -- https://master.php.net/note/delete/82641/spam
Del: non-english -- https://master.php.net/note/delete/82641/non-english
Del: in docs -- https://master.php.net/note/delete/82641/in+docs
Del: other reasons-- https://master.php.net/note/delete/82641
Reject -- https://master.php.net/note/reject/82641
Search -- https://master.php.net/manage/user-notes.php