初学,写一个函数用于存储日志调试。
function WriteLog($msg)
{
$filename = dirname(__FILE__) ."\\Debug.log";
$handler = null; if (($handler = fopen($filename, 'ab+')) !== false)
{
fwrite($handler, '['.date('Y-m-d H:i:s').']'."\t".$msg."\n");
fclose($handler);
}
}
2023-07-23 16:52:34
初学,写一个函数用于存储日志调试。
function WriteLog($msg)
{
$filename = dirname(__FILE__) ."\\Debug.log";
$handler = null; if (($handler = fopen($filename, 'ab+')) !== false)
{
fwrite($handler, '['.date('Y-m-d H:i:s').']'."\t".$msg."\n");
fclose($handler);
}
}