<legend id='WDfuF'><style id='WDfuF'><dir id='WDfuF'><q id='WDfuF'></q></dir></style></legend>

  • <small id='WDfuF'></small><noframes id='WDfuF'>

  • <tfoot id='WDfuF'></tfoot>
    <i id='WDfuF'><tr id='WDfuF'><dt id='WDfuF'><q id='WDfuF'><span id='WDfuF'><b id='WDfuF'><form id='WDfuF'><ins id='WDfuF'></ins><ul id='WDfuF'></ul><sub id='WDfuF'></sub></form><legend id='WDfuF'></legend><bdo id='WDfuF'><pre id='WDfuF'><center id='WDfuF'></center></pre></bdo></b><th id='WDfuF'></th></span></q></dt></tr></i><div id='WDfuF'><tfoot id='WDfuF'></tfoot><dl id='WDfuF'><fieldset id='WDfuF'></fieldset></dl></div>
      • <bdo id='WDfuF'></bdo><ul id='WDfuF'></ul>

        浏览器显示 而不是 ´

        时间:2023-09-25
      1. <legend id='5uQnV'><style id='5uQnV'><dir id='5uQnV'><q id='5uQnV'></q></dir></style></legend>

        <small id='5uQnV'></small><noframes id='5uQnV'>

          <tbody id='5uQnV'></tbody>

          <tfoot id='5uQnV'></tfoot>
                  <bdo id='5uQnV'></bdo><ul id='5uQnV'></ul>
                • <i id='5uQnV'><tr id='5uQnV'><dt id='5uQnV'><q id='5uQnV'><span id='5uQnV'><b id='5uQnV'><form id='5uQnV'><ins id='5uQnV'></ins><ul id='5uQnV'></ul><sub id='5uQnV'></sub></form><legend id='5uQnV'></legend><bdo id='5uQnV'><pre id='5uQnV'><center id='5uQnV'></center></pre></bdo></b><th id='5uQnV'></th></span></q></dt></tr></i><div id='5uQnV'><tfoot id='5uQnV'></tfoot><dl id='5uQnV'><fieldset id='5uQnV'></fieldset></dl></div>

                  本文介绍了浏览器显示 而不是 ´的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个包含以下文本的 PHP 文件:

                  I have a PHP file which has the following text:

                  <div class="small_italic">This is what you´ll use</div>
                  

                  在一台服务器上,它显示为:

                  On one server, it appears as:

                  This is what you´ll use
                  

                  另外一个,如:

                  This is what you�ll use
                  

                  为什么会有所不同,我该怎么做才能使其正确显示(作为撇号)?

                  Why would there be a difference and what can I do to make it appear properly (as an apostrophe)?

                  请注意(以供将来参考)

                  我实现了 Gordon/Gumbo 的建议,只是我是在服务器级别而不是应用程序级别实现的.请注意,(a) 我必须重新启动 Apache 服务器,更重要的是,(b) 我必须用正确编码的更正数据替换现有的坏数据".

                  I implemented Gordon's / Gumbo's suggestion, except I implemented it on a server level rather than the application level. Note that (a) I had to restart the Apache server and more importantly, (b) I had to replace the existing "bad data" with the corrected data in the right encoding.

                  /etc/php.ini

                  /etc/php.ini

                  default_charset = "iso-8859-1"

                  default_charset = "iso-8859-1"

                  推荐答案

                  您必须确保使用正确的字符集提供内容:

                  You have to make sure the content is served with the proper character set:

                  发送带有 header 的内容>

                  <?php header("Content-Type: text/html; charset=[your charset]"); ?>
                  

                  或 - 如果 HTTP charset 标头不存在 - 插入 元素进入:

                  or - if the HTTP charset headers don't exist - insert a <META> element into the <head>:

                  <meta http-equiv="Content-Type" content="text/html; charset=[your charset]" />
                  

                  正如属性名称所暗示的那样,http-equiv 相当于一个 HTTP 响应标头,如果未设置相应的 HTTP 标头,用户代理应该使用它们.

                  Like the attribute name suggests, http-equiv is the equivalent of an HTTP response header and user agents should use them in case the corresponding HTTP headers are not set.

                  就像 Hannes 在问题的评论中已经建议的那样,您可以查看您的网络服务器返回的标头以查看它提供的编码.两台服务器之间可能存在差异.因此,将上面的 [your charset] 部分更改为工作"服务器的部分.

                  Like Hannes already suggested in the comments to the question, you can look at the headers returned by your webserver to see which encoding it serves. There is likely a discrepancy between the two servers. So change the [your charset] part above to that of the "working" server.

                  有关原因的更详细解释,请参阅 Gumbo 的回答.

                  For a more elaborate explanation about the why, see Gumbo's answer.

                  这篇关于浏览器显示 而不是 ´的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用 PHP 下载脚本发送正确的文件大小 下一篇:PHP:如何使用 php 捕获浏览器窗口屏幕?

                  相关文章

                  最新文章

                  • <bdo id='Eo30O'></bdo><ul id='Eo30O'></ul>

                  1. <legend id='Eo30O'><style id='Eo30O'><dir id='Eo30O'><q id='Eo30O'></q></dir></style></legend>
                    <i id='Eo30O'><tr id='Eo30O'><dt id='Eo30O'><q id='Eo30O'><span id='Eo30O'><b id='Eo30O'><form id='Eo30O'><ins id='Eo30O'></ins><ul id='Eo30O'></ul><sub id='Eo30O'></sub></form><legend id='Eo30O'></legend><bdo id='Eo30O'><pre id='Eo30O'><center id='Eo30O'></center></pre></bdo></b><th id='Eo30O'></th></span></q></dt></tr></i><div id='Eo30O'><tfoot id='Eo30O'></tfoot><dl id='Eo30O'><fieldset id='Eo30O'></fieldset></dl></div>

                      <tfoot id='Eo30O'></tfoot>

                      <small id='Eo30O'></small><noframes id='Eo30O'>