作者 lyh

gx

... ... @@ -65,7 +65,12 @@ class FileManageController extends BaseController
*/
public function downLoad(){
$username = basename($this->param['path']);
$fileUrl = 'https://file.globalso.com'.$this->param['path'];
$parsed_url = parse_url($this->param['path']);
if(isset($parsed_url['scheme'])){
$fileUrl = $this->param['path'];
} else {
$fileUrl = 'https://file.globalso.com'.$this->param['path'];
}
// 设置响应头
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
... ...