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

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

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

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

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

      新的 Mysqli 對象為空

      New Mysqli Object is Null(新的 Mysqli 對象為空)
      <i id='P7hEL'><tr id='P7hEL'><dt id='P7hEL'><q id='P7hEL'><span id='P7hEL'><b id='P7hEL'><form id='P7hEL'><ins id='P7hEL'></ins><ul id='P7hEL'></ul><sub id='P7hEL'></sub></form><legend id='P7hEL'></legend><bdo id='P7hEL'><pre id='P7hEL'><center id='P7hEL'></center></pre></bdo></b><th id='P7hEL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='P7hEL'><tfoot id='P7hEL'></tfoot><dl id='P7hEL'><fieldset id='P7hEL'></fieldset></dl></div>

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

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

                <tbody id='P7hEL'></tbody>
                <bdo id='P7hEL'></bdo><ul id='P7hEL'></ul>
                <tfoot id='P7hEL'></tfoot>
                本文介紹了新的 Mysqli 對象為空的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在嘗試在 PHP 中使用 Mysqli 創(chuàng)建到 MySQL 數(shù)據(jù)庫的連接.當(dāng)我在獨(dú)立頁面上執(zhí)行以下代碼時(shí):

                I'm trying to create a connection to a MySQL database using Mysqli in PHP. When I execute the following code on a stand alone page:

                <?php
                ini_set('display_errors', 'On');
                error_reporting(E_ALL);
                
                $link = new mysqli('localhost', 'myuser', 'mypass', 'dbname');
                var_dump($link);
                

                我得到的只是一個(gè)空的 Mysqli 對象,其中所有的屬性都是空的.不會顯示任何錯(cuò)誤或任何內(nèi)容.

                All I get outputted is an empty Mysqli object where all the properties are null. No error or anything gets displayed.

                我也沒有在 Apache 或 MySQL 日志中看到任何條目.我有點(diǎn)不知所措.

                I also don't see any entries in the Apache or MySQL logs. I'm kind of at a lost on this one.

                推薦答案

                我也遇到了這個(gè)問題,并且瘋狂地嘗試調(diào)試它.事實(shí)證明,有時(shí)出于某種原因,mysqli 對象沒有被填充,但直接訪問它的屬性仍然會執(zhí)行其背后的本機(jī)代碼.因此,即使整個(gè) mysqli 對象的 var_dump 顯示空屬性,如果您單獨(dú)訪問它們,它們也會存在.如果 errorno 結(jié)果為 false,則您可能執(zhí)行了一個(gè)有效查詢,但結(jié)果集為空,這是您不期望的.希望這會有所幫助.

                I had this problem too and was going crazy trying to debug it. It turns out that sometimes for whatever reason the mysqli object does not get populated, but directly accessing it's properties still executes the native code behind it. So even though a var_dump of the entire mysqli object shows null properties, they are there if you access them individually. If errorno turns out to be false, you may have executed a valid query with an empty resultset that you weren't expecting. Hope this helps.

                $mysqli = mysqli_connect('localhost', 'root', '', 'test', 3306);
                
                var_dump($mysqli);
                
                var_dump($mysqli->client_info);
                var_dump($mysqli->client_version);
                var_dump($mysqli->info);
                

                和輸出:

                object(mysqli)[1]
                  public 'affected_rows' => null
                  public 'client_info' => null
                  public 'client_version' => null
                  public 'connect_errno' => null
                  public 'connect_error' => null
                  public 'errno' => null
                  public 'error' => null
                  public 'field_count' => null
                  public 'host_info' => null
                  public 'info' => null
                
                
                public 'insert_id' => null
                  public 'server_info' => null
                  public 'server_version' => null
                  public 'stat' => null
                  public 'sqlstate' => null
                  public 'protocol_version' => null
                  public 'thread_id' => null
                  public 'warning_count' => null
                
                string 'mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $' (length=50)
                int 50008
                null
                int 0
                string 'localhost via TCP/IP' (length=20)
                string '5.5.20-log' (length=10)
                int 50520
                

                這篇關(guān)于新的 Mysqli 對象為空的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                Call to undefined function mysqli_result::num_rows()(調(diào)用未定義的函數(shù) mysqli_result::num_rows())
                PHP Prepared Statement Problems(PHP 準(zhǔn)備好的語句問題)
                mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個(gè)結(jié)果)
                PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)

                • <bdo id='8AGAq'></bdo><ul id='8AGAq'></ul>
                  <legend id='8AGAq'><style id='8AGAq'><dir id='8AGAq'><q id='8AGAq'></q></dir></style></legend>
                        <tbody id='8AGAq'></tbody>

                      <small id='8AGAq'></small><noframes id='8AGAq'>

                          <i id='8AGAq'><tr id='8AGAq'><dt id='8AGAq'><q id='8AGAq'><span id='8AGAq'><b id='8AGAq'><form id='8AGAq'><ins id='8AGAq'></ins><ul id='8AGAq'></ul><sub id='8AGAq'></sub></form><legend id='8AGAq'></legend><bdo id='8AGAq'><pre id='8AGAq'><center id='8AGAq'></center></pre></bdo></b><th id='8AGAq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8AGAq'><tfoot id='8AGAq'></tfoot><dl id='8AGAq'><fieldset id='8AGAq'></fieldset></dl></div>
                          <tfoot id='8AGAq'></tfoot>
                        • 主站蜘蛛池模板: 欧美性猛交xxxx乱大交退制版 | 久久久久毛片 | 韩国三级中文字幕hd久久精品 | 免费色片 | 好吊日在线视频 | 在线网站免费观看18 | 国产黄色大片 | 亚洲理论片 | 午夜免费小视频 | 四虎影视大全 | 欧美国产精品一区二区 | 欧美日韩在线一区二区 | 午夜aaa | 羞羞网站在线观看 | 国产无遮挡又黄又爽免费网站 | 色中色综合 | 婷婷中文网 | 美日韩在线 | 午夜精品在线观看 | 超碰免费在线播放 | 国产一级网站 | 中文字幕在线免费看 | 成人午夜小视频 | 可以在线观看的av | 亚洲九九夜夜 | 在线观看国产小视频 | 日韩在线视频免费观看 | 国产九九热 | 日韩怡红院 | av网站免费在线观看 | 国产精品va | 欧美黄视频| 在线日韩 | 欧美mv日韩mv国产 | av福利网站 | 国产成人福利 | 日韩视频在线观看 | 免费看色片 | 黄色一级大片 | 午夜视频在线免费观看 | 亚洲成人毛片 |