RE: [PHP] fread() question
| From: | Christensen, BruceX R | Date: | Thu, 10 Aug 2000 02:43:54 +0000 |
| Subject: | RE: [PHP] fread() question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-11042@lists.php.net to get a copy of this message | ||
$lines_of_text = file($your_filename);
$text_block = join("", $lines_of_text);
$failure = mail($to,$subject,$text_block,$headers);
or
$failure = mail($to,$subject,join("", file($your_filename)),$headers);
--Bruce
Bruce Christensen
Intel Corporation
brucex.r.christensen@intel.com
-----Original Message-----
From: CDitty [mailto:mail@redhotsweeps.com]
Sent: Wednesday, August 09, 2000 7:34 PM
To: php-general@lists.php.net
Subject: [PHP] fread() question
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
--
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