久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='kyfx8'></tfoot>
      <legend id='kyfx8'><style id='kyfx8'><dir id='kyfx8'><q id='kyfx8'></q></dir></style></legend>
    1. <small id='kyfx8'></small><noframes id='kyfx8'>

    2. <i id='kyfx8'><tr id='kyfx8'><dt id='kyfx8'><q id='kyfx8'><span id='kyfx8'><b id='kyfx8'><form id='kyfx8'><ins id='kyfx8'></ins><ul id='kyfx8'></ul><sub id='kyfx8'></sub></form><legend id='kyfx8'></legend><bdo id='kyfx8'><pre id='kyfx8'><center id='kyfx8'></center></pre></bdo></b><th id='kyfx8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kyfx8'><tfoot id='kyfx8'></tfoot><dl id='kyfx8'><fieldset id='kyfx8'></fieldset></dl></div>

        <bdo id='kyfx8'></bdo><ul id='kyfx8'></ul>

        file_get_contents() 分解 UTF-8 字符

        file_get_contents() Breaks Up UTF-8 Characters(file_get_contents() 分解 UTF-8 字符)
          <bdo id='O1U4e'></bdo><ul id='O1U4e'></ul>

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

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

                • <tfoot id='O1U4e'></tfoot>
                    <tbody id='O1U4e'></tbody>
                • 本文介紹了file_get_contents() 分解 UTF-8 字符的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在從外部服務器加載 HTML.HTML 標記具有 UTF-8 編碼并包含諸如 ?,?,?,?,? 等字符.當我使用 file_get_contents() 加載 HTML 時,如下所示:

                  I am loading a HTML from an external server. The HTML markup has UTF-8 encoding and contains characters such as ?,?,?,?,? etc. When I load the HTML with file_get_contents() like this:

                  $html = file_get_contents('http://example.com/foreign.html');
                  

                  它弄亂了 UTF-8 字符并加載了 ?、?、¤ 和類似的廢話,而不是正確的 UTF-8 字符.

                  It messes up the UTF-8 characters and loads ?, ?, ¤ and similar nonsense instead of proper UTF-8 characters.

                  我該如何解決這個問題?

                  How can I solve this?

                  更新:

                  我嘗試將 HTML 保存到文件并使用 UTF-8 編碼輸出.兩者都不起作用,所以這意味著 file_get_contents() 已經(jīng)返回損壞的 HTML.

                  I tried both saving the HTML to a file and outputting it with UTF-8 encoding. Both doesn't work so it means file_get_contents() is already returning broken HTML.

                  更新2:

                  <!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="sk" lang="sk">
                  <head>
                  
                  <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="sk" />
                  <title>Test</title>
                  
                  </head>
                  <body>
                  
                  
                  <?php
                  
                  $html = file_get_contents('http://example.com');
                  echo htmlentities($html);
                  
                  ?>
                  
                  </body>
                  </html>
                  

                  推薦答案

                  好的.我發(fā)現(xiàn) file_get_contents() 沒有導致這個問題.我在另一個問題中談到了不同的原因.傻我.

                  Alright. I have found out the file_get_contents() is not causing this problem. There's a different reason which I talk about in another question. Silly me.

                  看到這個問題:為什么DOM會改變編碼?

                  這篇關于file_get_contents() 分解 UTF-8 字符的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)

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

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

                  • <i id='ts0Hy'><tr id='ts0Hy'><dt id='ts0Hy'><q id='ts0Hy'><span id='ts0Hy'><b id='ts0Hy'><form id='ts0Hy'><ins id='ts0Hy'></ins><ul id='ts0Hy'></ul><sub id='ts0Hy'></sub></form><legend id='ts0Hy'></legend><bdo id='ts0Hy'><pre id='ts0Hy'><center id='ts0Hy'></center></pre></bdo></b><th id='ts0Hy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ts0Hy'><tfoot id='ts0Hy'></tfoot><dl id='ts0Hy'><fieldset id='ts0Hy'></fieldset></dl></div>
                      <tbody id='ts0Hy'></tbody>
                      <legend id='ts0Hy'><style id='ts0Hy'><dir id='ts0Hy'><q id='ts0Hy'></q></dir></style></legend>

                          1. <tfoot id='ts0Hy'></tfoot>
                            主站蜘蛛池模板: 国产精品1区 | 午夜日韩视频 | 久久久久久久久久久蜜桃 | 日韩久久久一区二区 | 色吧久久| 欧美日韩专区 | 日韩精品 | 精品成人一区二区 | 国产成人精品一区二区在线 | 欧美一级淫片007 | 色呦呦在线 | 国产午夜精品视频 | 欧美成人精品一区二区男人看 | 欧美天堂 | av一级| 精品一区av| 综合久 | 国产精品一区二区三区在线 | 精品亚洲一区二区 | 欧美日韩不卡合集视频 | 日韩在线三级 | 久久久久久高潮国产精品视 | av一区二区在线观看 | 国产精品亚洲综合 | 亚洲欧美综合精品久久成人 | 99爱在线免费观看 | 精品国产一级片 | 在线一区二区观看 | 精品视频一区二区三区在线观看 | 天天av网 | 久久久久国产一区二区三区 | 夏同学福利网 | 99久久久久久 | 亚洲视频www | 欧美黄视频 | 国产专区在线 | 欧美日韩精品中文字幕 | 福利一区二区 | 国产91综合| 国产激情视频 | 欧美成年黄网站色视频 |