Re: [PHP] read a bunch of files that are in many directors into one string
- From: richardkurth@xxxxxxxxxxxxxx (Richard Kurth)
- Date: Thu, 07 Aug 2008 18:15:02 -0700
Version 5
First, which version of PHP? PHP 5 added a lot of features for reading
files.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Richard Kurth wrote:
I am trying to read a bunch of files that are in many directors into
one string
But it will only read one file.
Every file is a number 134328923 but they all start with 13
They are in 22 directors named 0 to 22
How can I make the script look in each directory and read each file
into a string that is one line after another.
There is only one line per file they are email address
$file="/remote/0/13*";
$data ="";
$fp = fopen($file, "r");
while(!feof($fp)) {
$data .= fgets($fp, 1024);
}
echo $data
.
- Follow-Ups:
- Re: [PHP] read a bunch of files that are in many directors into one string
- From: Micah Gersten
- Re: [PHP] read a bunch of files that are in many directors into one string
- References:
- read a bunch of files that are in many directors into one string
- From: Richard Kurth
- Re: [PHP] read a bunch of files that are in many directors into one string
- From: Micah Gersten
- read a bunch of files that are in many directors into one string
- Prev by Date: Re: [PHP] read a bunch of files that are in many directors into one string
- Next by Date: Re: [PHP] read a bunch of files that are in many directors into one string
- Previous by thread: Re: [PHP] read a bunch of files that are in many directors into one string
- Next by thread: Re: [PHP] read a bunch of files that are in many directors into one string
- Index(es):
Relevant Pages
|