我是 Laravel 的初学者。
我有这个代码:
$fileName = now()->toDateString() . '.docx';
$myFileName = 'Raport glowny'.docx;
try {
$objWriter->save(storage_path($fileName));
} catch (Exception $e) {
}
return response()->download(storage_path($fileName));
我有 2 个文件名:
$ fileName = now () -> toDateString (). '.Docx'; $ myFileName = '主报告'.docx;
$ fileName - 服务器磁盘上的文件名
$ myFileName - 我希望将文件保存在用户磁盘上的文件名。
是否可以在下载功能中指定文件名?
如果可以的话,该怎么办呢?
白衣非少年
子衿沉夜