Re my earlier post...
I seem to have figured it out by changing the following lines :
//===
{
$result= `grep -n Started logs/$file` ;
echo '' . $file .
''.
'' . $result . '';
}
//
Greetings,
Sorry for the delay in responding to your posting, I have been grappling
with your suggestion for a while and still things are not working out.
I have included all my code below and seek your advice..
As it stands, the resultant HTML page prints out the content of each
file, but i
You might want to use preg_match_all(). Here's a sample of getting whole row
with a specified word in it:
Niklas
-Original Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 12:36
To: Php-General
Subject: RE: [PHP] Search for keyword in txt file
O
At 11:36 07.03.2003, Chris Blake said:
[snip]
>Ok, it`s not that easy..here`s 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.
>
Thanks
Chris
On Fri, 2003-03-07 at 11:21, Niklas Lampén wrote:
> Dolphins are gone. ;)
>
> Here is your direction: preg_match(). If you need help with it (it can be
> compicated at first), ask. :)
>
>
> Niklas
>
>
> -Original Message-
> From:
Dolphins are gone. ;)
Here is your direction: preg_match(). If you need help with it (it can be
compicated at first), ask. :)
Niklas
-Original Message-
From: Chris Blake [mailto:[EMAIL PROTECTED]
Sent: 7. maaliskuuta 2003 11:16
To: [EMAIL PROTECTED]
Subject: [PHP] Search for keyword
Greetings learned PHP(eople),
What is the best method to search a text file for a specific string and
return it to a form ?
I`m not looking for you guys (and gals) to give me the answer, just
point me in the right direction
So long and thanks for all the fish..
--
Chris Blake
Office :
7 matches
Mail list logo