<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.quoted-printable-decode.php',
    1 => 'quoted_printable_decode',
    2 => '将 quoted-printable 字符串转换为 8-bit 字符串',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => '字符串 函数',
  ),
  'prev' => 
  array (
    0 => 'function.printf.php',
    1 => 'printf',
  ),
  'next' => 
  array (
    0 => 'function.quoted-printable-encode.php',
    1 => 'quoted_printable_encode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/strings/functions/quoted-printable-decode.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.quoted-printable-decode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">quoted_printable_decode</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">quoted_printable_decode</span> &mdash; <span class="dc-title">将 quoted-printable 字符串转换为 8-bit 字符串</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.quoted-printable-decode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>quoted_printable_decode</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   该函数返回 8 位二进制字符串，对应解码后的带引号可打印的字符串（参考 <a href="https://datatracker.ietf.org/doc/html/rfc2045" class="link external">&raquo;&nbsp;RFC2045</a>
   的 6.7 章节，而不是 <a href="https://datatracker.ietf.org/doc/html/rfc2821" class="link external">&raquo;&nbsp;RFC2821</a> 的 4.5.2 章节，因此不会去除行首的附加句号）。
  </p>
  <p class="para">
   该函数与 <span class="function"><a href="function.imap-qprint.php" class="function">imap_qprint()</a></span> 函数十分相似，但是该函数不需要依赖 IMAP 模块。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.quoted-printable-decode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       输入的字符串。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.quoted-printable-decode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回的 8-bit 二进制字符串。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.quoted-printable-decode-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>示例 #1 <span class="function"><strong>quoted_printable_decode()</strong></span> 示例</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$encoded </span><span style="color: #007700">= </span><span style="color: #0000BB">quoted_printable_encode</span><span style="color: #007700">(</span><span style="color: #DD0000">'Möchten Sie ein paar Äpfel?'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$encoded</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">quoted_printable_decode</span><span style="color: #007700">(</span><span style="color: #0000BB">$encoded</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>以上示例会输出：</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">string(37) &quot;M=C3=B6chten Sie ein paar =C3=84pfel?&quot;
string(29) &quot;Möchten Sie ein paar Äpfel?&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.quoted-printable-decode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.quoted-printable-encode.php" class="function" rel="rdfs-seeAlso">quoted_printable_encode()</a> - 将 8-bit 字符串转换成 quoted-printable 字符串</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>