function ljLog

function ljLog($data, $logName='DEBUG', $filePath='testlog'){
    // $e = new \Exception();
    // $trace = $e->getTrace();
    // file_put_contents($filePath, "[".date('Y-m-d H:i:s')."] trace:" . var_export($trace,true) . "\r\n", FILE_APPEND);
    
    // file_put_contents("testlog", "[".date('Y-m-d H:i:s')."] ".$logName.":" . json_encode($data,JSON_UNESCAPED_UNICODE) . "\r\n", FILE_APPEND);
    file_put_contents($filePath, "[".date('Y-m-d H:i:s')."] ".$logName.":" . var_export($data,true) . "\r\n\r\n", FILE_APPEND);
}

你可能感兴趣的:(java,前端,服务器)