<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.gzfile.php',
    1 => 'gzfile',
    2 => 'Lee un archivo gz completo en una matriz',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Funciones de Zlib',
  ),
  'prev' => 
  array (
    0 => 'function.gzeof.php',
    1 => 'gzeof',
  ),
  'next' => 
  array (
    0 => 'function.gzgetc.php',
    1 => 'gzgetc',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    '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">Lee un archivo gz completo en una matriz</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzfile-description">
  <h3 class="title">Descripción</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.boolean.php" class="type bool">bool</a></span> <code class="parameter">$use_include_path</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></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">
   Está función es identica a <span class="function"><a href="function.readgzfile.php" class="function">readgzfile()</a></span>, excepto que
   retorna el archivo en una matriz.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzfile-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       El nombre del archivo.
      </p>
     </dd>
    
    
     <dt><code class="parameter">use_include_path</code></dt>
     <dd>
      <span class="simpara">
       Si se establece a <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, también se buscan los archivos en la ruta <a href="ini.core.php#ini.include-path" class="link">include_path</a>.
      </span>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzfile-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Una matriz que contiene el archivo, una línea por celda, incluidas líneas vacías, y con líneas nuevas aún unidas,  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si ocurre un error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.gzfile-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.5.0</td>
      <td>
       <code class="parameter">use_include_path</code> es ahora de tipo <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>.
       Anteriormente, era de tipo <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.gzfile-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de <span class="function"><strong>gzfile()</strong></span></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">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.readgzfile.php" class="function" rel="rdfs-seeAlso">readgzfile()</a> - Lee todo el archivo comprimido</span></li>
    <li><span class="function"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - Abre un archivo gz</span></li>
   </ul>
  </p>
 </div>

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