我有同樣的問題,但在Google進行深入的搜索之後,問題解決了。此提示可能有助於您遇到同樣問題的您。 我已經擺弄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>
確保添加以下AddTypes被列入上述模塊,而不鎊(#)鍵英寸請不要使用#鍵在以下任何AddTypes面前的時候,你的模塊中加入他們的方式Apache服務器將讀取它們:
AddType image/gif .gif
AddType image/jpeg .jpeg .jpg
AddType image/png .png
我研究多,現在我知道,在IMG出現問題。 src中的javascript(我用js加載一些圖像)。那有什麼問題? – boyd
@boyd您使用的圖片來源是什麼? – Sampson
它是圖像的直接位置,例如:files/images/1.jpg和img.src =「files/images/1.jpg」; – boyd