久久久久久久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 對(duì)象為空

      New Mysqli Object is Null(新的 Mysqli 對(duì)象為空)
      <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 對(duì)象為空的處理方法,對(duì)大家解決問題具有一定的參考價(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 對(duì)象,其中所有的屬性都是空的.不會(huì)顯示任何錯(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 對(duì)象沒有被填充,但直接訪問它的屬性仍然會(huì)執(zhí)行其背后的本機(jī)代碼.因此,即使整個(gè) mysqli 對(duì)象的 var_dump 顯示空屬性,如果您單獨(dú)訪問它們,它們也會(huì)存在.如果 errorno 結(jié)果為 false,則您可能執(zhí)行了一個(gè)有效查詢,但結(jié)果集為空,這是您不期望的.希望這會(huì)有所幫助.

                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 對(duì)象為空的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(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>
                        • 主站蜘蛛池模板: 欧美日韩国产精品激情在线播放 | 久久久婷婷 | 国产成人精品久久二区二区 | 中文字幕av色 | 久久国产高清视频 | 成人性视频免费网站 | 欧美a在线观看 | 一区在线视频 | 欧美在线一区二区三区 | 精品丝袜在线 | 日韩精品免费播放 | 精品久久精品 | 色婷婷精品国产一区二区三区 | 在线亚洲电影 | 久久精品视频12 | 99久久久国产精品免费消防器 | 一区二区三区亚洲视频 | 麻豆久久久 | 秋霞影院一区二区 | 国产成人高清成人av片在线看 | 亚洲国产欧美在线 | 精品影视 | 亚洲精品中文字幕 | 国产精品视频一区二区三区 | 成人国产精品久久 | 在线欧美视频 | av网站观看 | 日本 欧美 国产 | 国产在线小视频 | 日本不卡在线观看 | 99精品国产一区二区青青牛奶 | 久久久久国产精品一区三寸 | 亚洲一区自拍 | 日本a视频| 精品久久久精品 | 天天操天天摸天天干 | 中文字幕11页| 日本一区二区在线视频 | 最新日韩精品 | 一级毛片免费看 | 综合久久综合久久 |