Skip to content

Instantly share code, notes, and snippets.

@thelebster
Created February 16, 2013 12:02
Show Gist options
  • Save thelebster/4966617 to your computer and use it in GitHub Desktop.
Save thelebster/4966617 to your computer and use it in GitHub Desktop.
<?php
function writeLog($string) {
$log_file = dirname(__FILE__) . '/log.txt';
if ($fh = @fopen($log_file, "a+")) {
fputs($fh, $string, strlen($string));
fclose($fh);
return true;
}
else {
return false;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment