Liziyu' Blog

李紫玉的文档备忘录……

首页 链接 关于

webman将硬盘文件合并下载

  • 作者: liziyu
  • 时间: 2022-08-19
  • 分类: PHP,Webman

直奔代码:

$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

取消回复

添加新评论

  • 上一篇: webman使用phpspeadsheet扩展导出excel文件
  • 下一篇: 微信小程序安装Vant Weapp组件库注意事项

分类

  • Blog
  • TypeScript
  • JavaScript
  • MiniProgram
  • PHP
  • Golang
  • Server
  • Laravel
  • ThinkPHP
  • Webman
  • C/C++/C#
  • TCP/IP
  • SQLserver
  • Swoole
  • OpenSSL
  • Java

归档

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2019
  • June 2019
  • May 2018
  • April 2018
  • March 2018
  • January 2018

其它

  • 登录
  • 文章 RSS
  • 评论 RSS
© 2023 Liziyu' Blog. 由 Typecho 强力驱动. 皖ICP备08004161号-13