PHP Doku:: Test for end-of-file on a gz-file pointer - function.gzeof.html

Verlauf / Chronik / History: (50) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzErweiterungen zur Datenkompression und ArchivierungZlib-KomprimierungZlib-Funktionengzeof

Ein Service von Reinhard Neidl - Webprogrammierung.

Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
Zlib-Funktionen

<<gzencode

gzfile>>

gzeof

(PHP 4, PHP 5)

gzeofTest for end-of-file on a gz-file pointer

Beschreibung

int gzeof ( resource $zp )

Tests the given GZ file pointer for EOF (end-of-file).

Parameter-Liste

zp

The gz-file pointer. It must be valid, and must point to a file successfully opened by gzopen().

Rückgabewerte

Returns TRUE if the gz-file pointer is at EOF or an error occurs; otherwise returns FALSE.

Beispiele

Beispiel #1 gzeof() example

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


Verdiene Geld mit Deiner Homepage oder deinem Blog: Setzte eine Textlinkwerbung und bestimme den Preis selber.
Einfach kostenlos anmelden und einen Platz auf Deiner Homepage anbieten.
Make money with your homepage or blog: Set a text link advertising and declare the price.
Register free of charge and offer a place on your homepage.
Ein BenutzerBeitrag:
- Beiträge aktualisieren...
thomas at poindessous dot com
21.06.2007 10:44
Be careful with this example. if gzopen doesn't return a valid handler, gzeof will do a nice loop.



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)