网页上出现奇怪的字符
我有一个涂鸦博客,我有一个奇怪的问题,显示奇怪的字符页面,如下所示:
alt text http: //amrelgarhy.com/ScreenShots/error.jpg
当我打开控制面板管理页面时,会显示此页面。当我尝试编辑我以前的帖子时,它也显示相同的内容。我的问题是我不知道其背后的原因是什么。
我不知道如何解决这个问题。我所有的帖子都是英文的,并且我总是使用 Windows Live Writer 来发帖。
以前有人遇到过这样的问题吗?您能否建议我找出此问题的原因以及任何可能的解决方案?
I have a graffiti blog and i have a strange problem which is showing strange char page like this:
alt text http://amrelgarhy.com/ScreenShots/error.jpg
This page was showing when I opened my control panel admin page. It's also showing the same when I try to edit one of my previous posts. My problem is that i don't know what's the reason behind it.
I am not sure how to fix this. All my posts are in English and I always use Windows Live Writer to post.
Has anyone faced a problem like this before? Can you advise me on finding the cause of this problem, and any potential solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试将其放入母版页中:
另外,检查是否已创建虚拟目录。
Try placing this in your master page:
Also, check that a virtual directory has been created.
内容 MIME 类型似乎有问题。您所看到的奇怪现象是因为服务器以二进制形式提供内容(我猜
application/octet-stream
),即使它应该以文本/html 形式提供内容。图像应以image/
形式提供,例如image/png
。您可以手动将 MIME 类型处理程序设置为某些文件类型。如果您使用的是 Apache,您可以轻松地在
.htaccess
文件中实现此目的,如下所示:如果您的内容不是 HTML,则 MIME 类型会有所不同。如果您的网络服务器没有自动执行此操作,您可能应该自己添加处理程序。
所有 MIME 类型都可以从这里找到:http://www.iana.org/assignments /媒体类型/
There seems to be a problem with the content MIME-types. The weirdness you are seeing happens because the server offers content as binary (I'm guessing
application/octet-stream
) even though it should offer them as text/html. Images should be offered asimage/<extension>
, for exampleimage/png
.You can manually set MIME-type handlers to certain filetypes. If you are using Apache, you could easily to this in a
.htaccess
file like this:If your content is something else than HTML the MIME-type is something different. If your web-server doesn't automatically do this you should probably add the handlers yourself.
All MIME-types can be found from here: http://www.iana.org/assignments/media-types/
看起来可能是编码不匹配。您是否在不理解 UTF 编码的工具中打开 UTF-8(或其他一些 Unicode)编码的文件,反之亦然?
Looks like it might be an encoding mismatch. Are you opening UTF-8 (or some other Unicode)-encoded files in a tool that doesn't understand UTF encodings or vice-versa?