PS when it encounters and breaks on a newline byte ("\n"), the newline byte itself is not included in the returned string.(PHP 4, PHP 5, PHP 7, PHP 8)
gzgets — Gzipli dosya tanıtıcısından bir satır döndürür
Belirtilen dosya tanıtıcısında mevcut konumdan itibaren en fazla
(sıkıştırılmamış) uzunluk - 1 bayt okur. Okuma
işlemi uzunluk - 1 baytta, ilk satırsonu
karakterinde veya dosya sonuna gelindiğinde (hangisi önce olursa) durur.
dtGzipli dosya tanıtıcısı. gzopen() tarafından açılmış bir dosyayı gösteren geçerli bir tanıtıcı olmalıdır.
uzunlukOkunacak verinin uzunluğu.
Bir hata oluşursa false aksi takdirde sıkıştırılmamış dizgeyi döndürür.
| Sürüm: | Açıklama |
|---|---|
| 8.0.0 |
uzunluk artık null olabiliyor;
evvelce, 1024 öntanımlıydı.
|
Örnek 1 - gzgets() örneği
<?php
$dt = gzopen('birdosya.gz', 'r');
while (!gzeof($dt)) {
$tampon = gzgets($dt, 4096);
echo $tampon;
}
gzclose($dt);
?>PS when it encounters and breaks on a newline byte ("\n"), the newline byte itself is not included in the returned string.