<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.zlib.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.gzpassthru.php',
    1 => 'gzpassthru',
    2 => 'Output all remaining data on a gz-file pointer',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Zlib 函数',
  ),
  'prev' => 
  array (
    0 => 'function.gzopen.php',
    1 => 'gzopen',
  ),
  'next' => 
  array (
    0 => 'function.gzputs.php',
    1 => 'gzputs',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/zlib/functions/gzpassthru.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gzpassthru" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzpassthru</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gzpassthru</span> &mdash; <span class="dc-title">
   Output all remaining data on a gz-file pointer
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzpassthru-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gzpassthru</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$stream</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Reads to <abbr title="End Of File">EOF</abbr> on the given gz-file pointer from the current position and
   writes the (uncompressed) results to standard output.
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    You may need to call <span class="function"><a href="function.gzrewind.php" class="function">gzrewind()</a></span> to reset the file
    pointer to the beginning of the file if you have already written data 
    to it. 
   </p>
  </p></blockquote>
  <div class="tip"><strong class="tip">小技巧</strong>
   <p class="para">
    If you just want to dump the contents of a file to the output buffer, 
    without first modifying it or seeking to a particular offset, you may 
    want to use the <span class="function"><a href="function.readgzfile.php" class="function">readgzfile()</a></span> function, which saves 
    you the <span class="function"><a href="function.gzopen.php" class="function">gzopen()</a></span> call.
   </p>
  </div>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzpassthru-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">stream</code></dt>
     <dd>
      <p class="para">
       The gz-file pointer. It must be valid, and must point to a file
       successfully opened by <span class="function"><a href="function.gzopen.php" class="function">gzopen()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzpassthru-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The number of uncompressed characters read from <code class="parameter">gz</code>
   and passed through to the input.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.gzpassthru-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>示例 #1 <span class="function"><strong>gzpassthru()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'file.gz'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gzpassthru</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

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