RE: [PHP] Re: line by line

From: Date: Fri, 31 Aug 2001 03:38:07 +0000
Subject: RE: [PHP] Re: line by line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65402@lists.php.net to get a copy of this message
Thanks Hugh, that makes a lot of sense. I shall look for further details about these functions and learn more about them. Thanks again for your input. Sincerely, Navid Yar -----Original Message----- From: Hugh Danaher [mailto:hdanaher@earthlink.net] Sent: Thursday, August 30, 2001 5:23 PM To: Navid Yar; php-general@lists.php.net Cc: Php-General Subject: Re: [PHP] Re: line by line That I know, calling fgets() 3 times would put the file pointer at the start of the 4th. line. However, fread() "won't let you decide the position from which the acquisition begins.." according to my help book. Perhaps the filepointer is in the right spot, perhaps not. fread() requires an fseak() file pointer to offset the start of the file to where you want to begin reading. I hope this helps. hugh ----- Original Message ----- From: Navid Yar <Superbus22@home.com> To: <php-general@lists.php.net> Sent: Thursday, August 30, 2001 1:50 PM Subject: RE: [PHP] Re: line by line > When using fgets() 3 times, does the pointer inside the file change > positions? > > Navid Yar > > -----Original Message----- > From: Richard Lynch [mailto:ceo@l-i-e.com] > Sent: Thursday, August 30, 2001 4:57 AM > To: php-general@lists.php.net > Subject: [PHP] Re: line by line > > > http://php.net/fopen > http://php.net/fgets > > Call fopen. > Call fgets 3 times. > Call fread($file, 1000000) to get the rest. > > -- > WARNING richard@zend.com address is an endangered species -- Use > ceo@l-i-e.com > Wanna help me out? Like Music? Buy a CD: > http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > ----- Original Message ----- > From: Gary <gbland@worldnet.att.net> > Newsgroups: php.general > To: <php-general@lists.php.net> > Sent: Monday, August 27, 2001 4:10 PM > Subject: line by line > > > > Hi All, > > I need to get info from a flat file line by line. What I need to do is > > get 3 separate lines and then a paragraph. Can someone point me to a > > tutorial or info on the subject. > > > > TIA > > Gary > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#65402) next »