Hello,

I have txt file "text.txt" that contains:
        line1:one
        line2:two
        line3:three
        line4:

Line 4 contains empty string.

If I use f*() functions to read from the file:
        $handle=fopen("text.txt","r");
        while (!feof($handle)) echo("-".chop(fgets($handle))."-<BR>");
        fclose($handle);

the RESULT will be:
        -one-
        -two-
        -three-
        --

I gzipped the file using ZLIB functions.

If I use gz*() function to read from the gzip file:
        $handle=gzopen("text.txt.gz","r");
        while (!gzeof($handle)) echo("-".chop(gzgets($handle))."-<BR>");
        gzclose($handle);

the RESULT will be:
        -one-
        -two-
        -three-

SEE? The last (empty) line is not returned .

What am I doing wrong?

OKi98


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to