|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-01-16 18:56 UTC] kingoleg at mail dot ru
Description: ------------ It seems, that fpassthru() is not binary safe Reproduce code: --------------- First 8 bytes of file (PNG image) on disk: "89 50 4E 47 0D 0A 1A 0A" <?php //... $f = @fopen( $filepath, "rb" ); @fpassthru ($f); //...die(); ?> Expected result: ---------------- First 8 bytes of saved file via browser: "89 50 4E 47 0D 0A 1A 0A" Actual result: -------------- First 8 bytes of saved file via browser: "0A 89 50 4E 47 0A 1A 0A" PS. Other bytes of files are equal. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 20:00:02 2026 UTC |
No. Right before @fpassthru ($f); headers sends. So, it can not be a new line before fpassthru, otherwise header(""); write error message. But there is no error messages in error_log, in browset output. And headers are right.