Hi I am trying to access a log file and read the fikle into an array and split the file using the space as a delimiter but i get this error.
Parse error: syntax error, unexpected $end in D:\wamp\www\jms .php on line 87
This is my code could somebody help me out please.
[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test site</title>
<link href="ais.css" rel="stylesheet " type="text/css" />
</head>
<body>
<table width="100%" border="0">
<tr>
<td width="15%" height="56" valign="top"><i mg src="http://intranet.it-solutions.usa.s iemens.com/images/siemens_logo_FF FFFF.gif" alt="Siemens" width="128" height="54" /></td>
<td width="42%" valign="top">&n bsp;</td>
<td width="43%" valign="middle" > &n bsp;<span class="style1"> Application Integration Services Team Portal </span> &nbs p; </td>
</tr>
<tr>
<td colspan="3" bgcolor="#66666 6"> </td>
</tr>
<tr>
<td height="79" bgcolor="#00003 3"><span class="leftnav" >Home</span><br />
<br />
<span class="leftnav" >TIBCO</span><br />
<br />
<span class="leftnav" >JMS</span><br />
<br />
<span class="leftnav" >Servers</span><br />
<br /></td>
<td colspan="2"><p> <strong><br />
JMS</strong></p>
<table width="70%" border="1">
<tr>
<th scope="col">Sta tus</th>
<th scope="col">Tim e Stamp </th>
<th scope="col">Que ue Name </th>
<th scope="col">No. of Messages </th>
<th scope="col">Siz e of Queue </th>
</tr>
<tr>
<?PHP
$msgcount = 10;
//load file into $fc array
$fc=file("log.t xt");
$f=fopen("log.t xt","r");
//loop through array using foreach
foreach($fc as $line)
{
?>
$lines2 = explode($line, " ");
<? if($lines2[4] > "$msgcount" ) {?>
<td><? echo $line[0]; ?></td>
<td><? echo $line[0]; ?></td>
<td><? echo $line[0]; ?></td>
<td><? echo $line[4]; ?></td>
<td><? echo $line[5] \t $line[6]; ?></td>
<? }
}
fclose($f);
} ?>
</tr>
</table>
<p><br />
<br />
</p></td>
</tr>
<tr>
<td colspan="3" bgcolor="#CCCCC C"> </td>
</tr>
</table>
</body>
</html>[/PHP]
Parse error: syntax error, unexpected $end in D:\wamp\www\jms .php on line 87
This is my code could somebody help me out please.
[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test site</title>
<link href="ais.css" rel="stylesheet " type="text/css" />
</head>
<body>
<table width="100%" border="0">
<tr>
<td width="15%" height="56" valign="top"><i mg src="http://intranet.it-solutions.usa.s iemens.com/images/siemens_logo_FF FFFF.gif" alt="Siemens" width="128" height="54" /></td>
<td width="42%" valign="top">&n bsp;</td>
<td width="43%" valign="middle" > &n bsp;<span class="style1"> Application Integration Services Team Portal </span> &nbs p; </td>
</tr>
<tr>
<td colspan="3" bgcolor="#66666 6"> </td>
</tr>
<tr>
<td height="79" bgcolor="#00003 3"><span class="leftnav" >Home</span><br />
<br />
<span class="leftnav" >TIBCO</span><br />
<br />
<span class="leftnav" >JMS</span><br />
<br />
<span class="leftnav" >Servers</span><br />
<br /></td>
<td colspan="2"><p> <strong><br />
JMS</strong></p>
<table width="70%" border="1">
<tr>
<th scope="col">Sta tus</th>
<th scope="col">Tim e Stamp </th>
<th scope="col">Que ue Name </th>
<th scope="col">No. of Messages </th>
<th scope="col">Siz e of Queue </th>
</tr>
<tr>
<?PHP
$msgcount = 10;
//load file into $fc array
$fc=file("log.t xt");
$f=fopen("log.t xt","r");
//loop through array using foreach
foreach($fc as $line)
{
?>
$lines2 = explode($line, " ");
<? if($lines2[4] > "$msgcount" ) {?>
<td><? echo $line[0]; ?></td>
<td><? echo $line[0]; ?></td>
<td><? echo $line[0]; ?></td>
<td><? echo $line[4]; ?></td>
<td><? echo $line[5] \t $line[6]; ?></td>
<? }
}
fclose($f);
} ?>
</tr>
</table>
<p><br />
<br />
</p></td>
</tr>
<tr>
<td colspan="3" bgcolor="#CCCCC C"> </td>
</tr>
</table>
</body>
</html>[/PHP]
Comment