gzeof

(PHP 4, PHP 5, PHP 7, PHP 8)

gzeofGzipli dosya tanıtıcında dosya sonunu sınar

Açıklama

function gzeof(resource $dt): bool

Gzipli dosya tanıtıcısında dosya sonuna gelinmişse true döndürür.

Bağımsız Değişkenler

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);
?>

add a note

User Contributed Notes 1 note

up
5
thomas at poindessous dot com
19 years ago
Be careful with this example. if gzopen doesn't return a valid handler, gzeof will do a nice loop.
To Top