直奔代码:

$content = file_get_contents($file1);
$content .= file_get_contents($file2);
return response($content)->withHeaders([
    'Content-Disposition' => 'attachment; filename=' . urlencode('文件名'),
    'Content-Type' => 'application/octet-stream',
]);

转自:https://www.workerman.net/q/9089

标签: none

添加新评论