Created
March 17, 2011 18:27
-
-
Save roelven/874848 to your computer and use it in GitHub Desktop.
Custom logfunction by @joepvl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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