php 记录日志时 基础的日志格式

 2019-02-19 11:29:56  /api/shop/shopManagements?shopId=undefined REQUEST:HTTP://mutest.drcloud.cn/mod/payment/xr/result.asp?status=04&s=1&sign=2cf02e21e329c86ad96e7194f14088b645bfff00 RESPONSE: <font face="Arial" size=2><p>payment_error '800a03e8'
<p>payment_error
<p>\boss\mod\lib\payment.asp, line 110</font><p><hr>
<small>Host by <a href="http://www.9465.net" target="_blank">NetBox Version 2.9 Build 4401</a></small>
</body></html> 
 
 
基础的日志格式  日期时间 + 动作URL + 返回状态 (成功或失败)+ 请求URL及参数(resquest) + 返回全结果(response)

$server['REQUEST_URI']  这个可以获取动作URL 
 
https://blog.csdn.net/lk142500/article/details/80424945
1 function writelog($dir,$content){
2     $fp = fopen($dir,"a");
3     fwrite($fp, $content);
4     fclose($fp);
5 }

 

posted @ 2019-02-19 11:43  没事就更  阅读(746)  评论(0编辑  收藏  举报