我有同样的问题,但在我在谷歌中进行了深入搜索后,问题得到了解决。这个技巧可能对你们中的一些有同样问题的人有所帮助。我摆弄了 Apache httpd.conf 文件。请转到文件的以下部分:
</IfModule> mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
</IfModule>
确保在没有 POUND(#)KEY 的上述模块中添加以下 AddTypes。当您将它们添加到模块中时,请不要在以下任何 AddTypes 前面使用 # 键,这样 Apache 服务器会读取它们:
AddType image/gif .gif
AddType image/jpeg .jpeg .jpg
AddType image/png .png