久久久久久久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 對象為空的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在嘗試在 PHP 中使用 Mysqli 創建到 MySQL 數據庫的連接.當我在獨立頁面上執行以下代碼時:

                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);
                

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

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

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

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

                推薦答案

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

                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
                

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

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

                相關文檔推薦

                store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                PHP Prepared Statement Problems(PHP 準備好的語句問題)
                mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                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>
                        • 主站蜘蛛池模板: 影音先锋成人资源 | 国产免费麻豆视频 | 亚洲精品国产第一综合99久久 | 免费一级欧美在线观看视频 | 国产精品1区 | 日本在线免费 | 欧美激情在线精品一区二区三区 | 黄色av免费网站 | 欧美日韩综合一区 | 成人在线视频免费观看 | 伊人久久综合 | 欧美一级免费观看 | 国产情侣久久 | 97超碰站| 国产区高清 | 日本免费在线观看视频 | 青娱乐av | 亚洲专区在线 | 欧美激情一区二区 | 国产精品福利在线 | 国产精品色婷婷久久58 | 99精品国产一区二区三区 | 国产一区二区在线免费观看 | 亚洲男女视频在线观看 | 精品国产乱码久久久久久1区2区 | 在线国产小视频 | 欧美在线视频网 | www日本在线 | 一区二区三区免费 | 国产成人一区二区三区 | 久久久久久久久国产精品 | 成人一区二区三区在线观看 | 在线观看av网站永久 | 亚洲精品成人av久久 | 成人精品一区 | 久久国产精品-国产精品 | 男女黄网站 | 国产一区二区三区免费观看在线 | 久久精品国产亚洲一区二区三区 | h视频免费在线观看 | 玩丰满女领导对白露脸hd |