Re: Upload problem - PC, *nix, and Max EOL characters

From: Date: Tue, 26 Nov 2002 21:39:55 +0000
Subject: Re: Upload problem - PC, *nix, and Max EOL characters
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-126190@lists.php.net to get a copy of this message
Ah, okay. However, it seems to ignore a Mac EOL character. I'm installing the PHP4.3 (test version) to try the auto_detect_line_endings configuration option. Cheers, Lee Matt Vos wrote: > 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 > > -- 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" -._ _.--'"'--._ _.--'"'--._ _.--'"`'--._ _ '-:.'||"':-. '-:.'||"':-. '-:.'||"':-. '.` : '. '. '. | | | |'. '. | | | |'. '. | | | |'. '.: '. '. : '. '.| | | | '. '.| | | | '. '.| | | | '. '. : '. `. ' '. .:_ | :_.' '. .:_ | :_.' '. .:_ | :_.' '. .' `. -..,..-' -..,..-' -..,..-' `

« previous php.general (#126190) next »