网站不显示。而是一群奇怪的角色?

发布于 2024-08-27 19:43:47 字数 993 浏览 6 评论 0原文

‹�����혱jÃ0†w=Å=AÜ ÂЃ)ÅKGÅ:¢En%¹©ß¾²Ý 7xèpußøãŸ~ÝöÇ®Ömót¨•îŸû®©îao‚½‘Í:ºR†æk@´huõÃ(]­;z:¼•Íö¾þ{¥•‚¾ímwi£_±Ä1)–ÄÇ�‡‘,‰%Ž#YKF²Ä²Ä8ŒèKF²$–88ŒdI,qpÉ’Xâà0’%±Ä1Àaþe–TïÆOŒ@ 2^ßÇh"ù¦`Î!뜄yœ"Dü˜0e°Ó:ËË>e„ñʈfp.à(U®<œv¿ì;xñhRY3˜‹¡�ÞdŒ;Uºõ×R°WkÑ^Z÷¥¯Wß.Ò¤·��

这正是网络浏览器中显示的内容,而不是我的网站。尽管在本地主机上该网站运行良好。这是一个基于 Zend Framework 的网站,在本地主机上,输出看起来像这样(缩短版本):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en-US" />


</head>
<body>

<!--

LOTS OF HTML HERE

-->

</body>
</html>

什么可能导致此问题?它以前可以工作,这个错误今天才出现(或者可能昨天就已经出现了,我不确定)。

‹�����혱jÃ0†w=Å=AÜ ÂЃ)ÅKGÅ:¢En%¹©ß¾²Ý 7xèpußøãŸ~ÝöÇ®Ömót¨•îŸû®©îao‚½‘Í:ºR†æk@´huõÃ(]­;z:¼•Íö¾þ{¥•‚¾ímwi£_±Ä1)–ÄÇ�‡‘,‰%Ž#YKF²Ä²Ä8ŒèKF²$–88ŒdI,qpÉ’Xâà0’%±Ä1Àaþe–TïÆOŒ@ 2^ßÇh"ù¦`Î!뜄yœ"Dü˜0e°Ó:ËË>e„ñʈfp.à(U®<œv¿ì;xñhRY3˜‹¡�ÞdŒ;Uºõ×R°WkÑ^Z÷¥¯Wß.Ò¤·��

That's exactly what shows up instead of my website in the web browser. Though on localhost the website works great. It's a Zend Framework based website, on localhost the output looks something like this (shortened version):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en-US" />


</head>
<body>

<!--

LOTS OF HTML HERE

-->

</body>
</html>

What could cause this problem? It used to work before, this bug has only appeared today (or maybe already yesterday, I'm not sure).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暗地喜欢 2024-09-03 19:43:47

更新:哈!这似乎是一个连锁反应。查看响应标头的最后一行:

Date: Sun, 04 Apr 2010 17:06:39 GMT
Server: LiteSpeed
Accept-Ranges: bytes
Connection: close
Etag: "17b7-4a7b64fa-0"
Last-Modified: Thu, 06 Aug 2009 23:19:22 GMT
Content-Type: text/html
Content-Length: 303

509 Bandwidth Limit ExceededContent-Encoding: gzip

“超出 509 带宽限制”后面的换行符似乎丢失了。这似乎搞乱了有关被 gzip 压缩的内容的信息。我猜垃圾是在超出带宽的情况下显示的错误消息,这也解释了为什么它如此之小。

Update: Ha! This seems to be a chain reaction. Look at the last line of your response headers:

Date: Sun, 04 Apr 2010 17:06:39 GMT
Server: LiteSpeed
Accept-Ranges: bytes
Connection: close
Etag: "17b7-4a7b64fa-0"
Last-Modified: Thu, 06 Aug 2009 23:19:22 GMT
Content-Type: text/html
Content-Length: 303

509 Bandwidth Limit ExceededContent-Encoding: gzip

The newline behind "509 bandwidth limit exceeded" seems to be missing. This seems to screw up the information about the content being gzipped. I'm guessing the garbage is the error message that gets displayed in case of exceeded bandwidth, which also explains why it's so small.

夜访吸血鬼 2024-09-03 19:43:47

尝试删除指定 UTF-8 的内容类型元标记...这可能是错误的。

Try removing the content-type meta tag which specifies UTF-8... it might be wrong.

够运 2024-09-03 19:43:47

尝试将“接受编码”设置为空:

$client->setHeaders(array('Accept-encoding' => ''));
$client->request();

希望有帮助。

Try to set the 'Accept-encoding' to null:

$client->setHeaders(array('Accept-encoding' => ''));
$client->request();

Hope it helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文