正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -65,7 +65,12 @@ class FileManageController extends BaseController | @@ -65,7 +65,12 @@ class FileManageController extends BaseController | ||
| 65 | */ | 65 | */ |
| 66 | public function downLoad(){ | 66 | public function downLoad(){ |
| 67 | $username = basename($this->param['path']); | 67 | $username = basename($this->param['path']); |
| 68 | - $fileUrl = 'https://file.globalso.com'.$this->param['path']; | 68 | + $parsed_url = parse_url($this->param['path']); |
| 69 | + if(isset($parsed_url['scheme'])){ | ||
| 70 | + $fileUrl = $this->param['path']; | ||
| 71 | + } else { | ||
| 72 | + $fileUrl = 'https://file.globalso.com'.$this->param['path']; | ||
| 73 | + } | ||
| 69 | // 设置响应头 | 74 | // 设置响应头 |
| 70 | header('Content-Description: File Transfer'); | 75 | header('Content-Description: File Transfer'); |
| 71 | header('Content-Type: application/octet-stream'); | 76 | header('Content-Type: application/octet-stream'); |
-
请 注册 或 登录 后发表评论