RE: [PHP] Search for keyword in txt file

From: Date: Wed, 12 Mar 2003 15:03:36 +0000
Subject: RE: [PHP] Search for keyword in txt file
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-139312@lists.php.net to get a copy of this message
Re my earlier post... I seem to have figured it out by changing the following lines : //======================================================================= { $result= grep -n Started logs/$file ; echo '<tr><td><font size="2"><a href="/logs/'.$file.'">' . $file . '</td></font></a>'. '<td>' . $result . '</td>'; } //======================================================================== Now it works the way it`s supposed to...... On Fri, 2003-03-07 at 12:38, Ernest E Vogelsinger wrote: > At 11:36 07.03.2003, Chris Blake said: > --------------------[snip]-------------------- > >Ok, its not that easy......heres my code...I wanna search > >all the > >files in the "logs" directory and for each file found I want it to > >search for the word "started" and print that line into a table row..... > > > >I will probably need to do like a "for each" loop....but where do I > >insert it ? > --------------------[snip]-------------------- > > In case you're _not_ in safe mode: > > $result = grep -n started logs/*; > > > -- > >O Ernest E. Vogelsinger > (\) ICQ #13394035 > ^ http://www.vogelsinger.at/ > > > -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 Your mouse has moved. Windows must be restarted for the change to take effect. Reboot now? [ OK ]

« previous php.general (#139312) next »