正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -347,7 +347,7 @@ class FileController | @@ -347,7 +347,7 @@ class FileController | ||
| 347 | // 设置响应头 | 347 | // 设置响应头 |
| 348 | header('Content-Description: File Transfer'); | 348 | header('Content-Description: File Transfer'); |
| 349 | header('Content-Type: application/octet-stream'); | 349 | header('Content-Type: application/octet-stream'); |
| 350 | - header('Content-Disposition: attachment; filename="' . $info['name'] . '"'); | 350 | + header('Content-Disposition: attachment; filename="' . !empty($info['name']) ? $info['name'] : '未命名'.basename($info['path']) . '"'); |
| 351 | // 下载文件 | 351 | // 下载文件 |
| 352 | readfile($fileUrl); | 352 | readfile($fileUrl); |
| 353 | } | 353 | } |
-
请 注册 或 登录 后发表评论