|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-06-27 20:20 UTC] adax2000 at tlen dot pl
Description:
------------
the problem was descibed year ago in #26742 but there's no answer.
i supouse there's bug in function base64_encode
or in file_get_contents, due to this i cannot send mail with attachments. is it possible that i have some error in configuration witch make this
Reproduce code:
---------------
echo base64_encode(file_get_contents("rys1.gif"));
Expected result:
----------------
R0lGODdhZABGAPcAAAAAAP////////////...
I get this in version 4.3.6
Actual result:
--------------
R0lGODdhZFwwRlww91wwXDBcMFwwXDD/////...
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
<?php echo base64_encode(file_get_contents("http://lifewise.ecreative.pl/user_files/rys1.gif")); ?>and the pair (that was oryginaly used in pear class MIME) $fd = fopen("rys2.gif","rb"); $string = base64_encode(fread($fd,filesize("rys2.gif")); realy should'n add this magic_quotos even if they are enabled at least in windows where you asure "rb" mean "read as binary"