我认为我的 apache 网络服务器有问题。我无法参考jquery.js
我收到以下错误:
带镀铬:
Uncaught SyntaxError: Unexpected token ILLEGAL
使用火狐浏览器:
Error: illegal character
Source File: http://xxxxxxxxx/test/javascript/jquery.js
Line: 1
Source Code:
�Hz�ÚH[9�R
下面是我的测试html代码
<html>
<head>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript">
function doclick(){
jQuery('#hello').attr('value', "mmmmef")
}
</script>
</head>
<body>
<input type="button" name="hello" id="hello" value="hello" onclick="doclick();" />
</body>
</html>
这不仅发生在jquery.js
,这些非法字符被附加到所有js
and css
files.
我用 ssh 登录并查看这些js
and css
文件与vi
命令,但没有这些字符。但是,当我尝试使用 FTP 客户端 Filezilla 或 CuteFTP 下载或查看/编辑时,包含这些非法字符。
我的服务器出了什么问题?相同的代码可以在我本地的Windows服务器和另一个centos服务器上运行。
我找到了解决方案
http://www.cyberciti.biz/tips/apache-223-corrupt-file-download-issue.html http://www.cyberciti.biz/tips/apache-223-corrupt-file-download-issue.html
只需打开 httpd.conf 并输入以下行
EnableMMAP off
EnableSendfile off
then
# /sbin/service httpd restart
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)