最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php怎么写日志?php实现的简单日志写入函数
时间:2022-06-24 16:37:32 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
functionlog($logthis){ file_put_contents('logfile.log',date("Y-m-d H:i:s")." ".$logthis."rn", FILE_APPEND | LOCK_EX); } // use rn for new line on windows, just n on linux // PHP_EOL cross platform solution for new line // // so better to use this functionlog($logthis){ file_put_contents('logfile.log',date("Y-m-d H:i:s")." ".$logthis.PHP_EOL, FILE_APPEND | LOCK_EX); } |
相关文章
- 未定事件簿鼓悦鸣音怎么样 未定事件簿鼓悦鸣音活动介绍 05-13
- 未定事件簿夏彦此夜曲中怎么样 夏彦此夜曲中思绪介绍 05-13
- 重返未来1999星锑启航向明日怎么样 星锑启航向明日衣着介绍 05-13
- 最新版gateio官网版 05-13
- 安币app官方下载最新版安装 05-13
- ice冰币app免费版 05-13