note 113336 deleted from function.header by tularis
| From: | tularis@php.net | Date: | Fri, 04 Apr 2014 11:31:45 +0000 |
| Subject: | note 113336 deleted from function.header by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199175@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
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.