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

search for in the

gzfile> <gzencode
[edit] Last updated: Fri, 24 May 2013

view this page in

gzeof

(PHP 4, PHP 5)

gzeofIndique si la fin d'un fichier (EOF) compressé est atteinte

Description

int gzeof ( resource $zp )

Indique si la fin d'un fichier compressé est atteinte, c'est à dire si le pointeur est à la position EOF.

Liste de paramètres

zp

Le pointeur de fichier gz. Il doit être valide et doit pointer vers un fichier ouvert avec succès grâce à la fonction gzopen().

Valeurs de retour

Retourne TRUE si le pointeur de fichier gz est à la fin du fichier (EOF) ou si une erreur survient ; sinon, retourne FALSE.

Exemples

Exemple #1 Exemple avec 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 - [1 notes]
up
0
thomas at poindessous dot com
5 years ago
Be careful with this example. if gzopen doesn't return a valid handler, gzeof will do a nice loop.

 
show source | credits | sitemap | contact | advertising | mirror sites