<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.gzread.php',
    1 => 'gzread',
    2 => 'Liest binary-safe aus einer gz-Datei',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Zlib-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.gzputs.php',
    1 => 'gzputs',
  ),
  'next' => 
  array (
    0 => 'function.gzrewind.php',
    1 => 'gzrewind',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/zlib/functions/gzread.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gzread" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzread</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gzread</span> &mdash; <span class="dc-title">Liest binary-safe aus einer gz-Datei</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzread-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gzread</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="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$length</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>gzread()</strong></span> liest bis zu <code class="parameter">length</code>
   Bytes vom angegebenen gz-Dateizeiger. Das Lesen stoppt, wenn
   <code class="parameter">length</code> (unkomprimierte) Bytes gelesen wurden
   oder <abbr title="End Of File">EOF</abbr> (Dateiende) erreicht wurde, je nachdem, was
   zuerst eintrifft.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzread-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">stream</code></dt>
     <dd>
      <p class="para">
       Der gz-Dateizeiger. Dieser muss auf eine gültige, erfolgreich mit
       <span class="function"><a href="function.gzopen.php" class="function">gzopen()</a></span> geöffnete Datei zeigen.
      </p>
     </dd>
    
    
     <dt><code class="parameter">length</code></dt>
     <dd>
      <p class="para">
       Die Anzahl der zu lesenden Bytes.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzread-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Die gelesenen Daten. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.gzread-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>7.4.0</td>
      <td>
       Diese Funktion gibt jetzt bei einem Fehler <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurück; vorher wurde
       <code class="literal">0</code> zurückgegeben.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.gzread-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>gzread()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Liest den Inhalt einer gz-Datei in einen String<br /></span><span style="color: #0000BB">$filename </span><span style="color: #007700">= </span><span style="color: #DD0000">"/usr/local/something.txt.gz"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$zd </span><span style="color: #007700">= </span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">, </span><span style="color: #DD0000">"r"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$contents </span><span style="color: #007700">= </span><span style="color: #0000BB">gzread</span><span style="color: #007700">(</span><span style="color: #0000BB">$zd</span><span style="color: #007700">, </span><span style="color: #0000BB">10000</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$zd</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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

 <div class="refsect1 seealso" id="refsect1-function.gzread-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.gzwrite.php" class="function" rel="rdfs-seeAlso">gzwrite()</a> - Ausgabe in gz-komprimierte Dateien</span></li>
    <li><span class="function"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - &Ouml;ffnet eine gz-Datei</span></li>
    <li><span class="function"><a href="function.gzgets.php" class="function" rel="rdfs-seeAlso">gzgets()</a> - Get line from file pointer</span></li>
    <li><span class="function"><a href="function.gzgetss.php" class="function" rel="rdfs-seeAlso">gzgetss()</a> - Holt eine Zeile vom gz-Dateizeiger und entfernt die HTML-Tags</span></li>
    <li><span class="function"><a href="function.gzfile.php" class="function" rel="rdfs-seeAlso">gzfile()</a> - Liest eine ganze gz-Datei in ein Array</span></li>
    <li><span class="function"><a href="function.gzpassthru.php" class="function" rel="rdfs-seeAlso">gzpassthru()</a> - Gibt alle verbleibenden Daten eines gz-Dateizeigers aus</span></li>
   </ul>
  </p>
 </div>

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