我一直在使用PHP脚本将数据从我的数据库(MysqL)导出到XLS文件.
虽然文件导出过程在Firefox和IE上运行良好.
尝试使用Google Chrome导出时出错.
谷歌浏览器错误是
Duplicate headers received from server
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_disPOSITION): Multiple distinct Content-disposition headers received. This is disallowed to protect against HTTP response splitting attacks.
我需要一些帮助.
谢谢
解决方法:
我已经在PHP导出代码的标题部分找到了我的问题.错误和正确的行如下:
不正确
header("Content-disposition: attachment;filename=\"".$this->filename."\"");
正确
header("Content-disposition: attachment; filename=\"".$this->filename."\"");
希望这可以帮助.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。