Re: fread() question

From: Date: Thu, 10 Aug 2000 02:49:09 +0000
Subject: Re: fread() question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11047@lists.php.net to get a copy of this message
On 9 Aug, CDitty wrote: > I have a multilined textile that I want emailed to me every time the script > is run. The only problem is that each line is different sizes. If I use > fread(), I have to specify the number of chars to read. Does anyone know > of a way to have it read to end of line? I looked through my manual and > didn't see anything. Below is an example of the text file I am reading. > > mysqld ended on Wed Aug 9 09:54:39 MDT 2000 > mysqld started on Wed Aug 9 09:58:54 MDT 2000 > /usr/local/libexec/mysqld: ready for connections > mysqld ended on Wed Aug 9 16:14:01 MDT 2000 > mysqld started on Wed Aug 9 16:15:49 MDT 2000 > /usr/local/libexec/mysqld: ready for connections > 000809 19:41:50 /usr/local/libexec/mysqld: Normal shutdown > > Thanks > > CDitty > You can use filesize to get the size of the file you want to fread; check the fread example in the manual. Or, more crudely, you could feed fread a wildly huge value :-) Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#11047) next »