Re: PHP File Reading Problem
by "Kevin Haidl" <kevinh(at)actofmind.com>
|
Date: |
Wed, 5 Apr 2000 09:53:49 -0700 |
To: |
"Rossi Designs" <webmaster(at)rossidesigns.net>, <hwg-languages(at)mail.hwg.org> |
References: |
telus jeff |
|
todo: View
Thread,
Original
|
|
Because:
i) the maximum line length is short
ii) it's test code.
> Why are you reading such a low number of characters?
>
> Rossi Designs
> PO Box 1084
> Holly Hill, FL 32125-1084
> Phone : (904) 226-8979
> URL : http://rossidesigns.net
> ----- Original Message -----
> From: Kevin Haidl <kevinh(at)actofmind.com>
> To: <hwg-languages(at)mail.hwg.org>
> Sent: Wednesday, April 05, 2000 4:32 AM
> Subject: PHP File Reading Problem
>
>
> | My fgets() seems to be broken (or I've completely misunderstood the
> | documentation.)
> |
> | $datafile = fopen($sourcePath, "r");
> | while(!feof($datafile)) {
> | $line = fgets($datafile, 32);
> | echo("$line<br>");
> | }
> |
> | Specifically, the fgets() in the above code do not stop reading the file
> | when it encounters a newline. The function always reads 31 characters.
> | This is distinctly inconvenient. Anybody seen this before? Any
> suggestions
> | for a workaround?
> |
> | Linux
> | PHP 3.0.12
> |
> | Kevin Haidl
> |
> |
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA