首页 > 解决方案 > 使用 PHP 脚本下载时出现网络故障

问题描述

我在 chrome 中收到网络故障消息,但在使用 php 下载脚本在其他浏览器上工作。

我将以下标题设置为下载。

cache-control: must-revalidate, post-check=0, pre-check=0
content-disposition: attachment; filename="export.csv"
content-length: 388436
content-type: application/octet-stream
date: Thu, 19 Jul 2018 13:41:02 GMT
expires: Wed, 19 Jul 2017 13:40:59 GMT
last-modified: Thu, 19 Jul 2018 13:41:02 GMT
pragma: public
server: nginx
set-cookie: admin=p5t1vd4e4u3j9g6gto5h046ki0; path=/admin; domain=xyz.com; secure; HttpOnly
status: 200
x-powered-by: PHP/7.0.29

我在 chrome 版本 67.3396.99 中遇到错误

标签: phpfiledownload

解决方案


推荐阅读