On Fri, 27 Jul 2001 06:25, Jeff Lewis wrote:
> 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
> [EMAIL PROTECTED]
> 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
Use file to pass the lines of the file into an array?
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
Daddy, what does FORMATTING DRIVE C: mean?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]