array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.quoted-printable-encode.php', 1 => 'quoted_printable_encode', ), 'up' => array ( 0 => 'ref.strings.php', 1 => '字符串 函数', ), 'prev' => array ( 0 => 'function.quoted-printable-decode.php', 1 => 'quoted_printable_decode', ), 'next' => array ( 0 => 'function.quotemeta.php', 1 => 'quotemeta', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/strings/functions/quoted-printable-encode.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
quoted_printable_encode — 将 8-bit 字符串转换成 quoted-printable 字符串
返回 quoted-printable 格式的字符,该格式由 » RFC2045 6.7.章节里制定。
该函数与 imap_8bit() 函数十分相似,不同的是该函数不需要 IMAP 模块就能运行。
string
输入的字符串。
返回编码之后的字符串。
示例 #1 quoted_printable_encode() 示例
<?php
$encoded = quoted_printable_encode('Möchten Sie ein paar Äpfel?');
var_dump($encoded);
var_dump(quoted_printable_decode($encoded));
?>
以上示例会输出:
string(37) "M=C3=B6chten Sie ein paar =C3=84pfel?" string(29) "Möchten Sie ein paar Äpfel?"