<?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.gzfile.php',
    1 => 'gzfile',
    2 => 'Liest eine ganze gz-Datei in ein Array',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Zlib-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.gzeof.php',
    1 => 'gzeof',
  ),
  'next' => 
  array (
    0 => 'function.gzgetc.php',
    1 => 'gzgetc',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/zlib/functions/gzfile.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.gzfile" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzfile</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">gzfile</span> &mdash; <span class="dc-title">Liest eine ganze gz-Datei in ein Array</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzfile-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gzfile</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$use_include_path</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Diese Funktion entspricht weitgehend <span class="function"><a href="function.readgzfile.php" class="function">readgzfile()</a></span>,
   gibt die Datei aber in einem Array zurück.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzfile-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Der Dateiname.
      </p>
     </dd>
    
    
     <dt><code class="parameter">use_include_path</code></dt>
     <dd>
      <p class="para">
       Sie können diesen optionalen Parameter auf <code class="literal">1</code>
       setzen, wenn Sie die Datei auch im <a href="ini.core.php#ini.include-path" class="link">include_path</a> suchen lassen wollen.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzfile-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Ein Array, das die Zeilen der Datei als Elemente enthält. Leere Zeilen sind
   enthalten, und Zeilenumbrüche sind noch angefügt. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.gzfile-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>gzfile()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$lines </span><span style="color: #007700">= </span><span style="color: #0000BB">gzfile</span><span style="color: #007700">(</span><span style="color: #DD0000">'somefile.gz'</span><span style="color: #007700">);<br />foreach (</span><span style="color: #0000BB">$lines </span><span style="color: #007700">as </span><span style="color: #0000BB">$line</span><span style="color: #007700">) {<br />    echo </span><span style="color: #0000BB">$line</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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

 <div class="refsect1 seealso" id="refsect1-function.gzfile-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.readgzfile.php" class="function" rel="rdfs-seeAlso">readgzfile()</a> - Gibt eine gz-komprimierte Datei aus</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>
   </ul>
  </p>
 </div>

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