Re: Upload problem - PC, *nix, and Max EOL characters
| From: | Matt Vos | Date: | Tue, 26 Nov 2002 21:37:17 +0000 |
| Subject: | Re: Upload problem - PC, *nix, and Max EOL characters | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126188@lists.php.net to get a copy of this message | ||
No, fgets() reads to EOL, I use it all the time.
fread() will read to EOF, if you let it, as it is binary safe.
Matt
----- Original Message -----
From: Lee P. Reilly <lreilly@lanl.gov>
Cc: <php-general@lists.php.net>
Sent: Tuesday, November 26, 2002 4:09 PM
Subject: Re: [PHP] Upload problem - PC, *nix, and Max EOL characters
>
> Hi,
>
> Thanks for the reply. I appreciate your help. fgets() reads to the EOF;
not the
> EOL. Is there something similar to fgets() that I can use? Perhaps where I
can
> state explicity read the file until you encounter and EOL char?
>
> Cheers,
> Lee
>
> Matt Vos wrote:
>
> > Loop an fgets()
> >
> > i.e.
> > $fp = fopen($file)
> > while ($filerow = fgets($fp,1024)) /* Read 1024 bytes or to EOL,
whichever
> > is first) */
> > {
>
> --
> Lee P. Reilly, ms:G758
> Szilard Resource, tel:505-665-7025
> Bioscience Division,
> SM-30 Bikini Atoll Rd,
> Los Alamos National Laboratory, mailto:lreilly@lanl.gov
> Los Alamos, NM 87545. http://home.lanl.gov/lreilly
>
> "Quidquid latine dictum sit, altum viditur"
>
> -._ _.--'"
'--._ _.--'"'--._
> _.--'"`'--._ _
> '-:.'||"':-.
> '-:.'||"':-.
> '-:.'||"':-. '.` : '.
> '. '. | | | |'. '. | | | |'. '. | | | |'.
> '.: '. '.
> : '. '.| | | | '. '.| | | | '. '.| | | | '.
> '. : '. `.
> ' '. .:_ | :_.' '. .:_ | :_.'
> '. .:_ | :_.' '. .' `.
> -..,..-' -..,..-'
> -..,..-' `
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>