正在显示
1 个修改的文件
包含
2 行增加
和
14 行删除
| @@ -317,19 +317,7 @@ class LoginController extends BaseController | @@ -317,19 +317,7 @@ class LoginController extends BaseController | ||
| 317 | $path = '/upload/m/video/2023-08'; | 317 | $path = '/upload/m/video/2023-08'; |
| 318 | $fileName = '64e81b9b80b1331590.mp4'; | 318 | $fileName = '64e81b9b80b1331590.mp4'; |
| 319 | $file_path = config('filesystems.disks.cos')['cdn1'].$path.'/'.$fileName; | 319 | $file_path = config('filesystems.disks.cos')['cdn1'].$path.'/'.$fileName; |
| 320 | - $param = [ | ||
| 321 | - 'file_path'=>$file_path, | ||
| 322 | - 'save_path'=>'/www/wwwroot/cos'.$path | ||
| 323 | - ]; | ||
| 324 | - @file_put_contents(storage_path('logs/lyh_error.log'), 'ceshi' . PHP_EOL, FILE_APPEND); | ||
| 325 | - $url = 'https://v6-file.globalso.com/upload.php'; | ||
| 326 | - $rs = http_post($url,$param,['charset=utf-8'],false); | ||
| 327 | - if(200 == (int)$rs){ | ||
| 328 | - return ['code'=>200]; | ||
| 329 | - $this->response('success',Code::SUCCESS,$rs); | ||
| 330 | - } | ||
| 331 | - return 0; | ||
| 332 | -// $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$path.'" https://v6-file.globalso.com/upload.php'; | ||
| 333 | -// return shell_exec($cmd); | 320 | + $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$path.'" https://v6-file.globalso.com/upload.php'; |
| 321 | + echo shell_exec($cmd); | ||
| 334 | } | 322 | } |
| 335 | } | 323 | } |
-
请 注册 或 登录 后发表评论