array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.gzgetc.php', 1 => 'gzgetc', ), 'up' => array ( 0 => 'ref.zlib.php', 1 => 'Zlib 函数', ), 'prev' => array ( 0 => 'function.gzfile.php', 1 => 'gzfile', ), 'next' => array ( 0 => 'function.gzgets.php', 1 => 'gzgets', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/zlib/functions/gzgetc.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
gzgetc — Get character from gz-file pointer
Returns a string containing a single (uncompressed) character read from the given gz-file pointer.
stream
The gz-file pointer. It must be valid, and must point to a file successfully opened by gzopen().
示例 #1 gzgetc() example
<?php
$gz = gzopen('somefile.gz', 'r');
while (!gzeof($gz)) {
echo gzgetc($gz);
}
gzclose($gz);
?>