View previous topic :: View next topic |
Author |
Message |
Kent -
Joined: 12 Jan 2003 Posts: 137
|
Posted: Thu Apr 15, 2004 2:17 am Post subject: stats.chl questions |
|
|
I have seen how you guys have the stats to show on the page in stats.chl
by using code such as ^@StatUpTime^
is there a possible way of displaying the server log file with a likewise code on the stats.chl page without using an iframe? I want it to print out the logs line by line.. I hate having to open the log file with notepad... I tried doing this with php code but no matter what I do the chl page will not render any output for php......
I am asuming there is a way but I may be wrong can you clue me in aprelium??? |
|
Back to top |
|
 |
Kent -
Joined: 12 Jan 2003 Posts: 137
|
Posted: Thu Apr 15, 2004 4:06 am Post subject: . |
|
|
by the way this is the php code I was trying to get to work with the chl files
I setup chl files to be read like php files in the console area for php...why will this not work?
Code: |
<?php
$filename ="c:\abs80\chl\access.txt";
$myFile = fopen($filename, "r");
if(! $myFile){
print ("File could not be opened.");
exit;
}
$fcontents = file($filename);
while (list ($line_num, $line) = each ($fcontents)) {
echo "<p><b>Line $line_num:</b> " . str_replace("<p>", "", $line) . "<br>\n";
}
fclose($myFile);
?>
|
|
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Apr 16, 2004 2:58 pm Post subject: Re: . |
|
|
Kent,
Syntax error:
Code: | $filename ="c:\abs80\chl\access.txt"; |
When you write a string in PHP, you must enter \\ to get a single \ because it is a special character.
So replace the quoted line with:
Code: | $filename ="c:\\abs80\\chl\\access.txt"; |
and retry your script. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|