Created
February 4, 2014 23:00
-
-
Save evitolins/8814198 to your computer and use it in GitHub Desktop.
Simple way to append data to a log file. Can be used for PHP troubleshooting.
This file contains 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
<? | |
$path = '/var/www/myWebsite/myLog.log'; | |
$data = 'myData'; | |
file_put_contents ($path , PHP_EOL . time() .' - ' . $data, FILE_APPEND | LOCK_EX ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment