1. <small id='O1s2Y'></small><noframes id='O1s2Y'>

        • <bdo id='O1s2Y'></bdo><ul id='O1s2Y'></ul>
        <tfoot id='O1s2Y'></tfoot>
        <legend id='O1s2Y'><style id='O1s2Y'><dir id='O1s2Y'><q id='O1s2Y'></q></dir></style></legend>

        <i id='O1s2Y'><tr id='O1s2Y'><dt id='O1s2Y'><q id='O1s2Y'><span id='O1s2Y'><b id='O1s2Y'><form id='O1s2Y'><ins id='O1s2Y'></ins><ul id='O1s2Y'></ul><sub id='O1s2Y'></sub></form><legend id='O1s2Y'></legend><bdo id='O1s2Y'><pre id='O1s2Y'><center id='O1s2Y'></center></pre></bdo></b><th id='O1s2Y'></th></span></q></dt></tr></i><div id='O1s2Y'><tfoot id='O1s2Y'></tfoot><dl id='O1s2Y'><fieldset id='O1s2Y'></fieldset></dl></div>
      1. PHP mysql 字符集 utf8 问题

        时间:2023-10-03
        • <bdo id='n0OUT'></bdo><ul id='n0OUT'></ul>
        • <i id='n0OUT'><tr id='n0OUT'><dt id='n0OUT'><q id='n0OUT'><span id='n0OUT'><b id='n0OUT'><form id='n0OUT'><ins id='n0OUT'></ins><ul id='n0OUT'></ul><sub id='n0OUT'></sub></form><legend id='n0OUT'></legend><bdo id='n0OUT'><pre id='n0OUT'><center id='n0OUT'></center></pre></bdo></b><th id='n0OUT'></th></span></q></dt></tr></i><div id='n0OUT'><tfoot id='n0OUT'></tfoot><dl id='n0OUT'><fieldset id='n0OUT'></fieldset></dl></div>

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

            <tfoot id='n0OUT'></tfoot>
                  <tbody id='n0OUT'></tbody>

                • <legend id='n0OUT'><style id='n0OUT'><dir id='n0OUT'><q id='n0OUT'></q></dir></style></legend>

                  本文介绍了PHP mysql 字符集 utf8 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  可能的重复:
                  UTF-8 全程

                  我正在其他人已经开发的网站上开发一些新功能.

                  I'm developing some new features on a website that somebody else already developed.

                  字符集有问题.

                  我看到数据库有一些表格是utf8的,有些表格是latin1的

                  I saw that the database had some tables in utf8 and some in latin1

                  所以我正在尝试将所有表格转换为 UTF8.

                  So I'm trying to convert all the tables in UTF8.

                  我做了一张表(现在这张表的字段也是utf8),但没有成功.

                  I did it for one table (also the fields of this table now are utf8), but was not successful.

                  我使用的是普通的 mysql 连接.我必须把任何配置说它必须用utf8连接到数据库?如果是女巫一?

                  I'm using the normal mysql connect. I have to put any config to say that it must connect with utf8 to the DB? If yes witch one?

                  在我的 html 中:

                  In my html I have:

                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                  

                  看起来有些字母有效,而有些则显示问号.例如,它无法显示与此不同的 ' '

                  It looks like some letters works and others display the question mark. For example it not able to display this ’ that is different of this: '

                  推荐答案

                  试试这个

                  <?php
                  
                     header('Content-Type: text/html; charset=utf-8');
                  ?>
                  

                  然后在连接中

                  <?php
                   $dbLink = mysql_connect($argHost, $argUsername, $argPassword);
                      mysql_query("SET character_set_results=utf8", $dbLink);
                      mb_language('uni'); 
                      mb_internal_encoding('UTF-8');
                      mysql_select_db($argDB, $dbLink);
                      mysql_query("set names 'utf8'",$dbLink);
                  ?>
                  

                  这篇关于PHP mysql 字符集 utf8 问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:UTF-8 问题 PHP/MySQL 下一篇:fwrite() 和 UTF8

                  相关文章

                  最新文章

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

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

                  2. <legend id='ghnIZ'><style id='ghnIZ'><dir id='ghnIZ'><q id='ghnIZ'></q></dir></style></legend>

                      <tfoot id='ghnIZ'></tfoot>