Last active
August 30, 2021 11:59
-
-
Save pixelbrackets/6fd80e9a09154672f06ea5253bba5aa6 to your computer and use it in GitHub Desktop.
Simple PHP log method
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
<?php | |
$data = ['foo' => 'Hello World']; | |
file_put_contents('/tmp/log.txt', time() . ' ' . print_r($data, true) . PHP_EOL, FILE_APPEND); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple TYPO3 Temp Logger:
A more flexible way is to use the TYPO3 logging API, see https://pixelbrackets.de/notes/flexible-logging-with-typo3