Very simple error_log viewer...

<?php
$fname = "./error_log";
if(file_exists($fname)) {
	if($_REQUEST['mode'] == 'del') {
		unlink($fname);
	} else {
		$contents = file_get_contents($fname);
		?>
		<div style="margin-bottom: 1em;"><a href="?mode=del">Delete error_log</a></div>
		<?php
		echo nl2br($contents);
	}
} else {
	echo 'No Errors!';
}
?>

Related posts:

  1. PHP fast, large (megabyte), data transfer between sessions
  2. Be Language Agnostic – Solve the Problem!
  3. PHP Daisy Chain Class Method Calls
  4. PHP Dynamic JavaScript SCRIPT Insertion for Embedding
  5. XMLRPC Pingbacks Using PHP