正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -29,8 +29,9 @@ class SyncVideo extends Command | @@ -29,8 +29,9 @@ class SyncVideo extends Command | ||
| 29 | protected $description = '同步图片与文件'; | 29 | protected $description = '同步图片与文件'; |
| 30 | public function handle() | 30 | public function handle() |
| 31 | { | 31 | { |
| 32 | - $this->param['path'] = $this->argument('path'); | 32 | + $path = $this->argument('path'); |
| 33 | $this->param['name'] = basename($this->param['path']); | 33 | $this->param['name'] = basename($this->param['path']); |
| 34 | + $this->param['path'] = str_replace('/'.$this->param['name'],'',$path); | ||
| 34 | $file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,0); | 35 | $file_path = $this->getUrl($this->param['path'].'/'.$this->param['name'], 0,0); |
| 35 | $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php'; | 36 | $cmd = 'curl -F "file_path='.$file_path.'" -F "save_path=/www/wwwroot/cos'.$this->param['path'].'" https://v6-file.globalso.com/upload.php'; |
| 36 | echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL; | 37 | echo date('Y-m-d H:i:s') . ' | ' . $cmd . PHP_EOL; |
-
请 注册 或 登录 后发表评论