dongqi6486 2010-06-29 02:48
浏览 266

如何使用jQuery下载从服务器直接输出的zip文件?

I have a php script that will generate zip file.

header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=random_name.zip");
echo $zipfile->file();

The filename is random and the server script doesn't even come with a return-file-uri function.

So my question is that how jQuery can handle this output (echo $zipfile->file()) so that I can download the zip file in the usual way?

Any help would be appreciated.

Regards,

Jesse

  • 写回答

1条回答 默认 最新

  • doushangan3690 2010-06-29 03:07
    关注

    jQuery doesn't handle downloads. Just point the browser to it directly.

    评论

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试