note 113336 added to function.header
| From: | Anonymous | Date: | Sat, 28 Sep 2013 18:41:39 +0000 |
| Subject: | note 113336 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196404@lists.php.net to get a copy of this message | ||
User blinki bill got upvoted for saying that all downloads start with a newline and providing a
workaround. Lol, did nobody see his error?
<?php
header("Content-Transfer-Encoding: binary\n");
readfile($fullpath);
?>
Look closely at the content-transfer-encoding. He ends it with a newline before he begins sending
the content. That is where his extra newline came from. A user bug. Not a PHP bug.
----
Server IP: 69.147.83.199
Probable Submitter: 5.150.203.3
----
Manual Page -- http://php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/113336
Del: integrated -- https://master.php.net/note/delete/113336/integrated
Del: useless -- https://master.php.net/note/delete/113336/useless
Del: bad code -- https://master.php.net/note/delete/113336/bad+code
Del: spam -- https://master.php.net/note/delete/113336/spam
Del: non-english -- https://master.php.net/note/delete/113336/non-english
Del: in docs -- https://master.php.net/note/delete/113336/in+docs
Del: other reasons-- https://master.php.net/note/delete/113336
Reject -- https://master.php.net/note/reject/113336
Search -- https://master.php.net/manage/user-notes.php