...
|
...
|
@@ -118,6 +118,21 @@ class Log { |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 立即写入文件
|
|
|
* @param $filename
|
|
|
* @param $data
|
|
|
* @param null $flag
|
|
|
* @author:dc
|
|
|
* @time 2024/11/13 15:30
|
|
|
*/
|
|
|
public static function put($filename,$data,$flag=null){
|
|
|
if (!dirname($filename)){
|
|
|
@mkdir(dirname($filename),0775,true);
|
|
|
}
|
|
|
@file_put_contents($filename,$data,$flag);
|
|
|
}
|
|
|
|
|
|
public function __destruct()
|
|
|
{
|
|
|
$this->write();
|
...
|
...
|
|