Be careful with this example. if gzopen doesn't return a valid handler, gzeof will do a nice loop.
gzeof
(PHP 4, PHP 5)
gzeof — Gzipli dosya tanıtıcında dosya sonunu sınar
Açıklama
int gzeof
( resource
$dt
)
Gzipli dosya tanıtıcısında dosya sonuna gelinmişse TRUE döndürür.
Değiştirgeler
-
dt -
Gzipli dosya tanıtıcısı. gzopen() tarafından açılmış bir dosyayı gösteren geçerli bir tanıtıcı olmalıdır.
Dönen Değerler
Gzipli dosya tanıtıcısında dosya sonuna gelinmişse veya bir hata oluşmuşsa
TRUE aksi takdirde FALSE döndürür.
Örnekler
Örnek 1 - gzeof() örneği
<?php
$gz = gzopen('birdosya.gz', 'r');
while (!gzeof($gz)) {
echo gzgetc($gz);
}
gzclose($gz);
?>
thomas at poindessous dot com
21-Jun-2007 01:44
