HI, I'm trying to read from an error log file on the server(error_log) and append to it everytime i run the script error-log.php. I did the following script, but i get all the error logs on the screen on my browser but not on the actual error_log file when I run the error-log.php.
Help please??? :eek:
$Error_log_path = "/usr/local/apache/logs/error_log";
$error_log = "/home/servername/public_html/scripts/error_log";
$fh = fopen($error_log, 'a');
$error = system("grep servername $Error_log_path");
fwrite($fh, $error);
fclose($fh);