zxhxx 3 år sedan
förälder
incheckning
453845bbab
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      application/common/controller/Api.php

+ 1 - 1
application/common/controller/Api.php

@@ -113,7 +113,7 @@ class Api
 
         // token
         $token = $this->request->server('HTTP_TOKEN', $this->request->request('token', \think\Cookie::get('token')));
-        @file_get_contents("token.txt",$token);
+        @file_put_contents("token.txt",$token);
         $path = str_replace('.', '/', $controllername) . '/' . $actionname;
         // 设置当前请求的URI
         $this->auth->setRequestUri($path);