Simple log like system
<?php
function wlog($m=""){
$myFile = "/tmp/shib.log"; #log path
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = $m."\n";
if($m==""){$stringData = "\n";};
fwrite($fh, $stringData);
fclose($fh);
};
/* Usage :
wlog("Write this to log...");
wlog();
wlog("New line...");
----
System usage:
tail -f /tmp/shib.log
*/
?>
Comments
blog comments powered by Disqus