gpt4 book ai didi

Apache 配置 Mime 类型 : xlsx files are being interpreted as zip files on download, 为什么?

转载 作者:行者123 更新时间:2023-12-02 15:45:35 28 4
gpt4 key购买 nike

背景:由于某种原因,每当用户尝试使用 MSIE 从我们的 Intranet 打开 xslx (excel 2007) 文件时,文件下载对话框会将其解释为“zip”文件。

诚然,xslx 文件确实 zip 文件,但我们不希望出现这种行为。请在 Excel 中打开。

问题:

Firefox,OTOH,可以正常打开文件。有没有可能是我的 apache 配置的问题?或者这只是客户端浏览器的问题?

最佳答案

您必须在网络服务器端添加一些新的 MIME-TYPES。

请参阅comment-thread on this windowsnerd.com page (自 2009 年起):

Add this to a .htaccess file and throw it on your site: AddType application/vnd.openxmlformats .docx .pptx .xlsx .xltx . xltm .dotx .potx .ppsx

Should fix many of the problems.

或者,您可以将其添加到位于 Apache Web 服务器配置目录中的 mime.types 文件中

application/vnd.ms-word.document.macroEnabled.12 .docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.ms-powerpoint.template.macroEnabled.12 potm
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-excel.addin.macroEnabled.12 xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.ms-excel.template.macroEnabled.12 xltm

http://www.webdeveloper.com/forum/showthread.php?t=162526

关于Apache 配置 Mime 类型 : xlsx files are being interpreted as zip files on download, 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1647339/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com