<?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 => 'ja',
  ),
  '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' => 'ja',
    '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); ?>