Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我运行 Perl base64 时,它返回的字符串与返回的字符串(在线编码系统)不同。这可能是什么原因?
这就是我获取图像的 base64 的方式。
use MIME::Base64; open (IMAGE, "C:\\wamp\\www\\image.png") or die "$!"; $raw_string = do{ local $/ = undef; <IMAGE>; }; $encoded = encode_base64( $raw_string );
You're missing
binmode(IMAGE);