/ Published in: PHP

Simple logger function
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
", FILE_APPEND | LOCK_EX); } // use for new line on windows, just \n on linux // PHP_EOL cross platform solution for new line // // so better to use this file_put_contents('logfile.log', date("Y-m-d H:i:s"). " " . $logthis.PHP_EOL, FILE_APPEND | LOCK_EX); }
Comments
