Apache 或 PHP 将 HTTP 标头添加到 CSS 和 JS 文件中
我在运行 PHP 5.3.3 的 CentOS 服务器上的 Web 应用程序中收到了 JS 和 CSS 文件的奇怪问题。我已经在 XAMPP (PHP 5.3.1) 上运行了这个应用程序,但它没有这样做。我所有的 CSS 样式和 JS 都在它们前面标记了 HTTP 标头,其中包含一些二进制内容。
阿帕奇出了什么问题?所有这些文件都可以正常链接,无需 PHP 参与 HTML 文档。
任何帮助或想法将不胜感激!谢谢!
<T� �07�)�E����@�@���ߌM�ߍ��P��v�a�u6�v�����
H�e7,��HTTP/1.1 200 OK
Date: Wed, 15 Feb 2012 17:37:49 GMT
Server: Apache/2.2.15 (CentOS)
Last-Modified: Wed, 15 Feb 2012 16:36:01 GMT
ETag: "e0504-d02-4b9034e9521ec"
Accept-Ranges: bytes
Content-Length: 3330
Connection: close
Content-Type: text/css
/* GENERAL */
body {
font-family: Geneva, Verdana;
font-size: 10px;
color: #333333;
margin: 20px;
padding: 0;
background-color: #FFFFFF;
}
I am receiving odd issues with my JS and CSS files in my web application on my CentOS server running PHP 5.3.3. I have ran this application on XAMPP (PHP 5.3.1) and it does not do this. All my CSS styling and JS have the HTTP headers stamped prepended to them with some binary something in there.
What is going wrong with Apache? All these files are linked normally without PHP involved for the HTML documents.
Any help or ideas would be most appreciated! Thanks!
<T� �07�)�E����@�@���ߌM�ߍ��P��v�a�u6�v�����
H�e7,��HTTP/1.1 200 OK
Date: Wed, 15 Feb 2012 17:37:49 GMT
Server: Apache/2.2.15 (CentOS)
Last-Modified: Wed, 15 Feb 2012 16:36:01 GMT
ETag: "e0504-d02-4b9034e9521ec"
Accept-Ranges: bytes
Content-Length: 3330
Connection: close
Content-Type: text/css
/* GENERAL */
body {
font-family: Geneva, Verdana;
font-size: 10px;
color: #333333;
margin: 20px;
padding: 0;
background-color: #FFFFFF;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
运行memtest86检查你的机器内存是否有问题。假设您使用的是发行版中的预编译包,它们不太可能以这种方式损坏,因此最可能的原因是内存问题。
Run memtest86 to check if your machine's memory is faulty. Assuming you are using precompiled packages from your distribution it's unlikely that they are damaged in such a way so the most likely reason is a memory issue.