【问题标题】:IE8 error while downloading a file下载文件时出现IE8错误
【发布时间】:2015-06-24 10:19:23
【问题描述】:

下载文件时弹出错误消息。它只发生在 Windows XP 和 Windows 7 上的 IE8 中。一旦我点击下载链接,就会出现此错误

“无法从 subdomain.domain.org 下载 11820”“无法打开此 Internet 站点。请求的站点不可用或找不到。请稍后再试。”

这里 11820 是节点 ID。我在我的网站中使用 SSL 证书,虽然网址是 https://subdomain.domain.org/

【问题讨论】:

  • 谁能帮忙。这是否与我们正在使用的 SSL 认证有关。
  • 我将 drupal 7 与 Apache 2 和 oracle 一起使用。
  • 我可以试试custom_file_download_headers_alter(array &$headers, $file) { header("Cache-Control: private, max-age=15"); }函数

标签: internet-explorer download http-headers


【解决方案1】:

找到解决办法

$headers = array( 'Content-Type' => 'force-download', 'Content-Disposition' => 'attachment; filename="' . $file->filename . '"', 'Content-Length' => $file->filesize, 'Content-Transfer-Encoding' => 'binary', 'Pragma' => 'private, no-cache', 'Cache-Control' => 'private, no-store, no-cache, max-age=0, must-revalidate', 'Expires' => '0', 'Accept-Ranges' => 'bytes' );

【讨论】:

    猜你喜欢
    • 2021-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-20
    • 2011-07-12
    相关资源
    最近更新 更多