|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-12 08:01 UTC] tony2001@php.net
[2005-05-12 09:01 UTC] justin at aofrozencity dot com
[2005-05-12 10:06 UTC] tony2001@php.net
[2005-05-12 17:16 UTC] justin at aofrozencity dot com
[2005-05-12 18:30 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ I figured out why the problem is. I found out that fread/fopen doesn't read image file exactly and properly because I checked orginal image file code that isn't match the image file code which was from fread/fopen. Reproduce code: --------------- // Output PNG Image $file = fopen('images/tmp/'.$tmpname, 'rb'); $source = fread($file , filesize('images/tmp/'.$tmpname)); fclose($file); header("Content-Type: image/png"); print($source); Expected result: ---------------- "The image cannot be displayed, because it contains errors"