Processing file...
| From: | Jeff Lewis | Date: | Thu, 26 Jul 2001 20:55:11 +0000 |
| Subject: | Processing file... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59829@lists.php.net to get a copy of this message | ||
I managed to process a directory of files but for some reason I am having
trouble figuring out this :/
I am going through a directory opening all dat files. Now it is working
properly but I need to grab the data from it. I need to grab each line as
indicated below.
Here is the code I was using to open the file....
$file="/home/saveraps/public_html/cgi-bin/Members/".$entry;
//Open current roster file
$fd = fopen ($file,'r');
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
$member = trim(substr($buffer,0,50));
echo "File: ".$entry."<BR>";
} //end file open - !eof
fclose ($fd);
And here is the structure of these files. For each line I need to grab it
and keep it associated with the members dat file. Each dat file contains
this info (hyrum.dat)
admin
admin
me@mysite.com
Homepage Title
http://yabb.xnull.com
Signature
3
Administrator
571803
HyrumAIM
HyrumYIM
Male
I Love YaBB 1 Gold!!!
bobafett.gif
01/01/01 at 01:01:01
Kitchener
07/14/1975
4
2
How can I grab all of these for each dat file I open up?
Jeff