Browse Source

最新ios充值优化

lizhen_gitee 1 year ago
parent
commit
05f1bde751
1 changed files with 5 additions and 0 deletions
  1. 5 0
      application/common.php

+ 5 - 0
application/common.php

@@ -639,6 +639,11 @@ function filePut($info,$text='notify.txt'){
     }
     $file = RUNTIME_PATH.'paylog/'.$text;
     touch_file($file);
+    if(filesize($file)>5242880)//大于5M自动切换
+    {
+        rename($file, $file.'notify_'.date('Y_m_d_H_i_s').'.txt');
+    }
+    touch_file($file);
     file_put_contents($file, "\r\n".date('Y-m-d H:i:s').' '.$info, FILE_APPEND);
 }
 if(!function_exists('touch_file')) {