<?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 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.readgzfile.php',
    1 => 'readgzfile',
    2 => 'Выводит содержимое gz-файла',
  ),
  'up' => 
  array (
    0 => 'ref.zlib.php',
    1 => 'Функции Zlib',
  ),
  'prev' => 
  array (
    0 => 'function.ob-gzhandler.php',
    1 => 'ob_gzhandler',
  ),
  'next' => 
  array (
    0 => 'function.zlib-decode.php',
    1 => 'zlib_decode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/zlib/functions/readgzfile.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.readgzfile" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">readgzfile</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">readgzfile</span> &mdash; <span class="dc-title">Выводит содержимое gz-файла</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.readgzfile-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>readgzfile</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.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Функция считывает, распаковывает и записывает файл в стандартный вывод.
  </p>
  <p class="para">
   Функция <span class="function"><strong>readgzfile()</strong></span> читает файлы не только в формате gzip;
   в таких случаях функция <span class="function"><strong>readgzfile()</strong></span>
   считывает данные из файла без распаковки.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.readgzfile-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Название файла. Файл откроется из файловой системы и содержимое файла запишется в стандартный вывод.
      </p>
     </dd>
    
    
     <dt><code class="parameter">use_include_path</code></dt>
     <dd>
      <span class="simpara">
       Со значением <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> функция определят путь к файлу, который требуется открыть,
       с учётом значения директивы <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.readgzfile-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает количество байтов в файле после распаковки, если выполнилась успешно, или <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, если возникла ошибка
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.readgzfile-errors">
  <h3 class="title">Ошибки</h3>
  <p class="para">
При сбое функция генерирует ошибку уровня <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>.
</p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.readgzfile-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.5.0</td>
      <td>
       Тип параметра <code class="parameter">use_include_path</code> теперь – логическое значение (<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>).
       Ранее он был целым числом (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>).
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.readgzfile-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.gzpassthru.php" class="function" rel="rdfs-seeAlso">gzpassthru()</a> - Вывод всех оставшихся данных из указателя gz-файла.</span></li>
    <li><span class="function"><a href="function.gzfile.php" class="function" rel="rdfs-seeAlso">gzfile()</a> - Считывает весь gz-файл в массив</span></li>
    <li><span class="function"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - Открыть gz-файл</span></li>
   </ul>
  </p>
 </div>

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