mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
73 lines
3.3 KiB
HTML
73 lines
3.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Test for EOF on a gz-file pointer</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.gzeof" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">gzeof</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">gzeof</span> — <span class="dc-title">Test for <acronym title="End Of File">EOF</acronym> on a gz-file pointer</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.gzeof-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>gzeof</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$zp</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Tests the given GZ file pointer for <acronym title="End Of File">EOF</acronym>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.gzeof-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">zp</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The gz-file pointer. It must be valid, and must point to a file
|
|
successfully opened by <span class="function"><a href="gzopen.html" class="function">gzopen()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.gzeof-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns <strong><code>TRUE</code></strong> if the gz-file pointer is at <acronym title="End Of File">EOF</acronym> or an error occurs;
|
|
otherwise returns <strong><code>FALSE</code></strong>.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.gzeof-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-872">
|
|
<p><strong>Example #1 <span class="function"><strong>gzeof()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$gz </span><span style="color: #007700">= </span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'somefile.gz'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br />while (!</span><span style="color: #0000BB">gzeof</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">)) {<br /> echo </span><span style="color: #0000BB">gzgetc</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$gz</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |