Skip to content

Instantly share code, notes, and snippets.

@roelven
Created March 17, 2011 18:27
Show Gist options
  • Save roelven/874848 to your computer and use it in GitHub Desktop.
Save roelven/874848 to your computer and use it in GitHub Desktop.
Custom logfunction by @joepvl
<?php
function myLog($message) {
try {
$logDir = getcwd();
$logFile = fopen("$logDir/efa.txt", "a");
$timeStamp = date("ymd-His");
fwrite($logFile, ":: [$timeStamp] ::\n$message\n\n");
fclose($logFile);
} catch (Exception $e) {
echo $e->getMessage();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment