# PHP 函数:imap\_binary()

**URL:** <https://www.isharkfly.com/t/php-imap-binary/4732>\
**Category:** PHP\
**Created:** [October 20, 2012, 3:21am UTC](https://www.isharkfly.com/t/php-imap-binary/4732 "2012-10-20T03:21:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 20, 2012, 3:21am UTC](https://www.isharkfly.com/t/php-imap-binary/4732/1 "2012-10-20T03:21:32Z")

</div>

将八位转成 base64 编码。

语法: string imap\_binary(string string);

返回值: 字符串

函数种类: 网络系统

内容说明  
本函数将字符串转成 MIME BASE64 编码。此编码方式可以让中文字或者图片也能在网络上顺利传输。更多的 BASE64 编码信息可以参考 RFC2045 文件之 6.8 节或是 base64\_encode()。
