Source of: /manual/en/function.readgzfile.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
),
'this' =>
array (
0 => 'function.readgzfile.php',
1 => 'readgzfile',
),
'up' =>
array (
0 => 'ref.zlib.php',
1 => 'Zlib Functions',
),
'prev' =>
array (
0 => 'function.gzwrite.php',
1 => 'gzwrite',
),
'next' =>
array (
0 => 'function.zlib-get-coding-type.php',
1 => 'zlib_get_coding_type',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.readgzfile" class="refentry">
<div class="refnamediv">
<h1 class="refname">readgzfile</h1>
<p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">readgzfile</span> — <span class="dc-title">Output a gz-file</span></p>
</div>
<a name="function.readgzfile.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>readgzfile</b></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$filename</tt></span>
[, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$use_include_path</tt><span class="initializer"> = 0</span></span>
] )</div>
<p class="para rdfs-comment">
Reads a file, decompresses it and writes it to standard output.
</p>
<p class="para">
<b>readgzfile()</b> can be used to read a file which is not in
gzip format; in this case <b>readgzfile()</b> will directly
read from the file without decompression.
</p>
</div>
<a name="function.readgzfile.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">filename</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The file name. This file will be opened from the filesystem and its
contents written to standard output.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">use_include_path</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
You can set this optional parameter to <i>1</i>, if you
want to search for the file in the <a href="ini.core.php#ini.include-path" class="link">include_path</a> too.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.readgzfile.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns the number of (uncompressed) bytes read from the file. If
an error occurs, <b><tt class="constant">FALSE</tt></b> is returned and unless the function was
called as <i>@readgzfile</i>, an error message is
printed.
</p>
</div>
<a name="function.readgzfile.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.gzpassthru.php" class="function" rel="rdfs-seeAlso">gzpassthru()</a> - Output all remaining data on a gz-file pointer</li>
<li class="member"><a href="function.gzfile.php" class="function" rel="rdfs-seeAlso">gzfile()</a> - Read entire gz-file into an array</li>
<li class="member"><a href="function.gzopen.php" class="function" rel="rdfs-seeAlso">gzopen()</a> - Open gz-file</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>