Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: gzeof - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gzfile" width="11" height="7"/> <gzencode
Last updated: Fri, 05 Sep 2008

view this page in

gzeof

(PHP 4, PHP 5)

gzeofgz ファイルポインタがファイル終端かどうか調べる

説明

int gzeof ( resource $zp )

与えられた GZ ファイルポインタが EOF (ファイル終端) を指すかどうかを調べます。

パラメータ

zp

gzファイルポインタは、有効なファイルポインタであり、かつ、 gzopen()によりオープンできたファイルを指している 必要があります。

返り値

gz ファイルポインタが EOF を指す、もしくはエラーが発生した場合 TRUE、 そうでなければ FALSE を返します。

例1 gzeof() の例

<?php
$gz 
gzopen('somefile.gz''r');
while (!
gzeof($gz)) {
  echo 
gzgetc($gz);
}
gzclose($gz);
?>



add a note add a note User Contributed Notes
gzeof
thomas at poindessous dot com
21-Jun-2007 05:44
Be careful with this example. if gzopen doesn't return a valid handler, gzeof will do a nice loop.

gzfile" width="11" height="7"/> <gzencode
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites