error_log($newtime, 3, "errors.log");只需要在需要记录的地方,插入error_log,就可以日志记录了。前提是必须在php.ini中开启errorlog支持。$newtime."\r\n" 实现换行。