/**
* 日志记录
* @param [string] $data [日志内容]
* @param [int] $type [支付类型标识]
* @param [string] $name [保存文件名称]
* @return
*/
function log_pay($data,$type,$name)
{
$fp = fopen("{$name}.txt", "a+");
$type_txt = array('[PC微信]','[APP微信]','[PC支付宝]','[APP支付宝]','[其他]');
fwrite($fp, $type_txt[$type] . date("Y-m-d H:i:s") . json_encode($data) . "\n");
fclose($fp);
}
php写文件方法
最新推荐文章于 2024-07-22 02:18:50 发布