Simple code that won't work
| From: | Jacob van Zanen | Date: | Tue, 17 Dec 2002 14:25:07 +0000 |
| Subject: | Simple code that won't work | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-128566@lists.php.net to get a copy of this message | ||
Hi All,
Reasonably new to PHP and trying to write a code that looks through my
logfiles and reports the lines that contain any of the keywords in my init
file.
However can't seem to get it to work
<?
// Open an ini file
if (!($IniContent = file("d:\MyPhp\initORA.ini")))
{
Print ("File could not be opened");
exit;
}
if (!($FileContent = file("d:\MyPhp\\test.ora")))
{
Print ("File could not be opened");
exit;
}
while (list ($LineNum, $Line) = each ($FileContent))
{
while (list($KeyNum, $IniParm) = each($IniContent))
{
if (strstr($Line,$IniParm))
{
print ("$Line");
}
}
}
?>
If the part that does not seem to work is the bit that does the comparison.
Anybody have an idea why???
TIA Jack