当前位置: 首页>>代码示例>>PHP>>正文


PHP mysqli_get_client_info函数代码示例

本文整理汇总了PHP中mysqli_get_client_info函数的典型用法代码示例。如果您正苦于以下问题:PHP mysqli_get_client_info函数的具体用法?PHP mysqli_get_client_info怎么用?PHP mysqli_get_client_info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mysqli_get_client_info函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAttribute

 public function getAttribute($attribute, &$source = null, $func = 'PDO::getAttribute', &$last_error = null)
 {
     if ($source == null) {
         $source =& $this->driver_options;
     }
     switch ($attribute) {
         case PDO::ATTR_AUTOCOMMIT:
             $result = mysqli_query($this->link, 'SELECT @@AUTOCOMMIT', MYSQLI_USE_RESULT);
             if (!$result) {
                 $this->set_driver_error(null, PDO::ERRMODE_EXCEPTION, $func);
             }
             $row = mysqli_fetch_row($result);
             mysqli_free_result($result);
             return intval($row[0]);
             break;
         case PDO::ATTR_CLIENT_VERSION:
             return mysqli_get_client_info();
             break;
         case PDO::ATTR_CONNECTION_STATUS:
             return mysqli_get_host_info($this->link);
             break;
         case PDO::ATTR_SERVER_INFO:
             return mysqli_stat($this->link);
             break;
         case PDO::ATTR_SERVER_VERSION:
             return mysqli_get_server_info($this->link);
             break;
         default:
             return parent::getAttribute($attribute, $source, $func, $last_error);
             break;
     }
 }
开发者ID:Deepab23,项目名称:clinic,代码行数:32,代码来源:mysqli.php

示例2: dump_properties

function dump_properties($mysqli)
{
    printf("\nClass variables:\n");
    $variables = array_keys(get_class_vars(get_class($mysqli)));
    sort($variables);
    foreach ($variables as $k => $var) {
        printf("%s = '%s'\n", $var, var_export(@$mysqli->{$var}, true));
    }
    printf("\nObject variables:\n");
    $variables = array_keys(get_object_vars($mysqli));
    foreach ($variables as $k => $var) {
        printf("%s = '%s'\n", $var, var_export(@$mysqli->{$var}, true));
    }
    printf("\nMagic, magic properties:\n");
    assert(@mysqli_affected_rows($mysqli) === @$mysqli->affected_rows);
    printf("mysqli->affected_rows = '%s'/%s ('%s'/%s)\n", @$mysqli->affected_rows, gettype(@$mysqli->affected_rows), @mysqli_affected_rows($mysqli), gettype(@mysqli_affected_rows($mysqli)));
    assert(@mysqli_get_client_info() === @$mysqli->client_info);
    printf("mysqli->client_info = '%s'/%s ('%s'/%s)\n", @$mysqli->client_info, gettype(@$mysqli->client_info), @mysqli_get_client_info(), gettype(@mysqli_get_client_info()));
    assert(@mysqli_get_client_version() === @$mysqli->client_version);
    printf("mysqli->client_version =  '%s'/%s ('%s'/%s)\n", @$mysqli->client_version, gettype(@$mysqli->client_version), @mysqli_get_client_version(), gettype(@mysqli_get_client_version()));
    assert(@mysqli_errno($mysqli) === @$mysqli->errno);
    printf("mysqli->errno = '%s'/%s ('%s'/%s)\n", @$mysqli->errno, gettype(@$mysqli->errno), @mysqli_errno($mysqli), gettype(@mysqli_errno($mysqli)));
    assert(@mysqli_error($mysqli) === @$mysqli->error);
    printf("mysqli->error = '%s'/%s ('%s'/%s)\n", @$mysqli->error, gettype(@$mysqli->error), @mysqli_error($mysqli), gettype(@mysqli_error($mysqli)));
    assert(@mysqli_field_count($mysqli) === @$mysqli->field_count);
    printf("mysqli->field_count = '%s'/%s ('%s'/%s)\n", @$mysqli->field_count, gettype(@$mysqli->field_count), @mysqli_field_count($mysqli), gettype(@mysqli_field_count($mysqli)));
    assert(@mysqli_insert_id($mysqli) === @$mysqli->insert_id);
    printf("mysqli->insert_id = '%s'/%s ('%s'/%s)\n", @$mysqli->insert_id, gettype(@$mysqli->insert_id), @mysqli_insert_id($mysqli), gettype(@mysqli_insert_id($mysqli)));
    assert(@mysqli_sqlstate($mysqli) === @$mysqli->sqlstate);
    printf("mysqli->sqlstate = '%s'/%s ('%s'/%s)\n", @$mysqli->sqlstate, gettype(@$mysqli->sqlstate), @mysqli_sqlstate($mysqli), gettype(@mysqli_sqlstate($mysqli)));
    assert(@mysqli_get_host_info($mysqli) === @$mysqli->host_info);
    printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n", @$mysqli->host_info, gettype(@$mysqli->host_info), @mysqli_get_host_info($mysqli), gettype(@mysqli_get_host_info($mysqli)));
    /* note that the data types are different */
    assert(@mysqli_info($mysqli) == @$mysqli->info);
    printf("mysqli->info = '%s'/%s ('%s'/%s)\n", @$mysqli->info, gettype(@$mysqli->info), @mysqli_info($mysqli), gettype(@mysqli_info($mysqli)));
    assert(@mysqli_thread_id($mysqli) > @$mysqli->thread_id);
    assert(gettype(@$mysqli->thread_id) == gettype(@mysqli_thread_id($mysqli)));
    printf("mysqli->thread_id = '%s'/%s ('%s'/%s)\n", @$mysqli->thread_id, gettype(@$mysqli->thread_id), @mysqli_thread_id($mysqli), gettype(@mysqli_thread_id($mysqli)));
    assert(@mysqli_get_proto_info($mysqli) === @$mysqli->protocol_version);
    printf("mysqli->protocol_version = '%s'/%s ('%s'/%s)\n", @$mysqli->protocol_version, gettype(@$mysqli->protocol_version), @mysqli_get_proto_info($mysqli), gettype(@mysqli_get_proto_info($mysqli)));
    assert(@mysqli_get_server_info($mysqli) === @$mysqli->server_info);
    printf("mysqli->server_info = '%s'/%s ('%s'/%s)\n", @$mysqli->server_info, gettype(@$mysqli->server_info), @mysqli_get_server_info($mysqli), gettype(@mysqli_get_server_info($mysqli)));
    assert(@mysqli_get_server_version($mysqli) === @$mysqli->server_version);
    printf("mysqli->server_version = '%s'/%s ('%s'/%s)\n", @$mysqli->server_version, gettype(@$mysqli->server_version), @mysqli_get_server_version($mysqli), gettype(@mysqli_get_server_version($mysqli)));
    assert(@mysqli_warning_count($mysqli) === @$mysqli->warning_count);
    printf("mysqli->warning_count = '%s'/%s ('%s'/%s)\n", @$mysqli->warning_count, gettype(@$mysqli->warning_count), @mysqli_warning_count($mysqli), gettype(@mysqli_warning_count($mysqli)));
    printf("\nAccess to undefined properties:\n");
    printf("mysqli->unknown = '%s'\n", @$mysqli->unknown);
    @($mysqli->unknown = 13);
    printf("setting mysqli->unknown, @mysqli_unknown = '%s'\n", @$mysqli->unknown);
    $unknown = 'friday';
    @($mysqli->unknown = $unknown);
    printf("setting mysqli->unknown, @mysqli_unknown = '%s'\n", @$mysqli->unknown);
    printf("\nAccess hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):\n");
    assert(@mysqli_connect_error() === @$mysqli->connect_error);
    printf("mysqli->connect_error = '%s'/%s ('%s'/%s)\n", @$mysqli->connect_error, gettype(@$mysqli->connect_error), @mysqli_connect_error(), gettype(@mysqli_connect_error()));
    assert(@mysqli_connect_errno() === @$mysqli->connect_errno);
    printf("mysqli->connect_errno = '%s'/%s ('%s'/%s)\n", @$mysqli->connect_errno, gettype(@$mysqli->connect_errno), @mysqli_connect_errno(), gettype(@mysqli_connect_errno()));
}
开发者ID:alphaxxl,项目名称:hhvm,代码行数:59,代码来源:mysqli_class_mysqli_properties_no_conn.php

示例3: get_details

 function get_details()
 {
     $result = $this->_owner->query('SHOW VARIABLES', false, true);
     while ($row = $result->fetch_row()) {
         $details[$row[0]] = $row[1];
     }
     $result->free();
     $details['engine'] = 'MySQLi';
     $details['client'] = mysqli_get_client_info();
     $details['server'] = $this->_owner->connect_id->server_info;
     $details['unicode'] = version_compare($details['server'], '4.1') >= 0;
     $details['host'] = mysqli_get_host_info($this->_owner->connect_id);
     return $details;
 }
开发者ID:cbsistem,项目名称:nexos,代码行数:14,代码来源:mysqli_mngr.php

示例4: search

 public function search($table, $columns, $searchValue, $exclude = null, $exactMatch = false)
 {
     if (strpos(mysqli_get_client_info(), 'mysqlnd ') === false) {
         return false;
     }
     $bind = array();
     $result = array();
     $table = self::mysqli()->real_escape_string($table);
     // We can't prepare tables, so this will have to do
     $sql = "SELECT * FROM {$table} WHERE";
     foreach ($columns as $key => $col) {
         if ($key == count($columns) - 1) {
             $sql .= ' ' . $col . ' LIKE ? AND ' . $col . ' NOT LIKE ?';
         } else {
             $sql .= ' ' . $col . ' LIKE ? AND ' . $col . ' NOT LIKE ? OR';
         }
         $bind[0] = isset($bind[0]) ? $bind[0] . "ss" : 'ss';
         $bind[] = "%" . $searchValue . "%";
         if ($exclude == null) {
             $bind[] = "";
         } else {
             $bind[] = "%" . $exclude . "%";
         }
     }
     foreach ($bind as $key => $value) {
         $bind[$key] =& $bind[$key];
         // Makes them references for bind_param
     }
     if ($stmt = $this->mysqli()->prepare($sql)) {
         call_user_func_array(array($stmt, "bind_param"), $bind);
         // See what I did there? Dynamic bind_param. Nifty
         try {
             $stmt->execute();
         } catch (Exception $e) {
             return false;
         }
         $results = $stmt->get_result();
         while ($row = $results->fetch_array(MYSQLI_ASSOC)) {
             $result[] = $row;
         }
         return $result;
     }
     return false;
 }
开发者ID:no2pencil,项目名称:ticket,代码行数:44,代码来源:db.class.php

示例5: _getInfoArray

 private function _getInfoArray()
 {
     $info['User']['Browser'] = $_SERVER['HTTP_USER_AGENT'];
     $info['User']['Role'] = current_user()->role;
     $info['System']['Omeka'] = OMEKA_VERSION;
     $info['System']['PHP'] = phpversion() . ' (' . php_sapi_name() . ')';
     $uname = php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('m');
     $info['System']['OS'] = $uname;
     $info['System']['MySQL Server'] = $this->_db->getServerVersion();
     $info['System']['MySQL Client'] = mysqli_get_client_info();
     if (function_exists('apache_get_version')) {
         $apacheVersion = apache_get_version();
         if ($apacheVersion) {
             $info['System']['Apache'] = $apacheVersion;
         }
     }
     $this->_addExtensionInfo($info);
     $this->_addPluginInfo($info);
     $this->_addThemeInfo($info);
     return apply_filters('system_info', $info);
 }
开发者ID:lchen01,项目名称:STEdwards,代码行数:21,代码来源:SystemInfoController.php

示例6: mysql_server

 public function mysql_server($num = '')
 {
     switch ($num) {
         case 1:
             return mysqli_get_server_info();
             //MySQL 服务器信息
             break;
         case 2:
             return mysqli_get_host_info();
             //取得 MySQL 主机信息
             break;
         case 3:
             return mysqli_get_client_info();
             //取得 MySQL 客户端信息
             break;
         case 4:
             return mysqli_get_proto_info();
             //取得 MySQL 协议信息
             break;
         default:
             return mysqli_get_client_info();
             //默认取得mysql版本信息
     }
 }
开发者ID:iloster,项目名称:tinyphp,代码行数:24,代码来源:lib_mysql.php

示例7: getDbInfo

 public function getDbInfo()
 {
     $charsets = $this->getCharsetInfo();
     $charset_str = array();
     foreach ($charsets as $name => $value) {
         $charset_str[] = "{$name} = {$value}";
     }
     return array("MySQLi Version" => @mysqli_get_client_info(), "MySQLi Host Info" => @mysqli_get_host_info($this->database), "MySQLi Server Info" => @mysqli_get_server_info($this->database), "MySQLi Client Encoding" => @mysqli_client_encoding($this->database), "MySQL Character Set Settings" => join(", ", $charset_str));
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:9,代码来源:MysqliManager.php

示例8: printConfig

/**
 * Renders stage 2: either config details panel (on success) or database details
 * error message (on fail).
 */
function printConfig()
{
    $_SESSION['ddb'] = ps('ddb');
    $_SESSION['duser'] = ps('duser');
    $_SESSION['dpass'] = ps('dpass');
    $_SESSION['dhost'] = ps('dhost');
    $_SESSION['dprefix'] = ps('dprefix');
    $_SESSION['siteurl'] = ps('siteurl');
    $GLOBALS['textarray'] = setup_load_lang($_SESSION['lang']);
    global $txpcfg;
    echo txp_setup_progress_meter(2) . n . '<div class="txp-setup">';
    if (!isset($txpcfg['db'])) {
        @(include txpath . '/config.php');
    }
    if (!empty($txpcfg['db'])) {
        echo graf(span(null, array('class' => 'ui-icon ui-icon-alert')) . ' ' . setup_gTxt('already_installed', array('{txpath}' => txpath)), array('class' => 'alert-block warning')) . setup_back_button(__FUNCTION__) . n . '</div>';
        exit;
    }
    // TODO: @see http://forum.textpattern.com/viewtopic.php?pid=263205#p263205
    //    if ('' === $_SESSION['dhost'] || '' === $_SESSION['duser'] || '' === $_SESSION['ddb']) {
    //        echo graf(
    //                span(null, array('class' => 'ui-icon ui-icon-alert')).' '.
    //                setup_gTxt('missing_db_details'),
    //                array('class' => 'alert-block warning')
    //            ).
    //            n.setup_back_button(__FUNCTION__).
    //            n.'</div>';
    //
    //        exit;
    //    }
    echo hed(setup_gTxt("checking_database"), 2);
    if (strpos($_SESSION['dhost'], ':') === false) {
        $dhost = $_SESSION['dhost'];
        $dport = ini_get("mysqli.default_port");
    } else {
        list($dhost, $dport) = explode(':', $_SESSION['dhost'], 2);
        $dport = intval($dport);
    }
    $dsocket = ini_get("mysqli.default_socket");
    $mylink = mysqli_init();
    if (@mysqli_real_connect($mylink, $dhost, $_SESSION['duser'], $_SESSION['dpass'], '', $dport, $dsocket)) {
        $_SESSION['dclient_flags'] = 0;
    } elseif (@mysqli_real_connect($mylink, $dhost, $_SESSION['duser'], $_SESSION['dpass'], '', $dport, $dsocket, MYSQLI_CLIENT_SSL)) {
        $_SESSION['dclient_flags'] = 'MYSQLI_CLIENT_SSL';
    } else {
        echo graf(span(null, array('class' => 'ui-icon ui-icon-closethick')) . ' ' . setup_gTxt('db_cant_connect'), array('class' => 'alert-block error')) . setup_back_button(__FUNCTION__) . n . '</div>';
        exit;
    }
    echo graf(span(null, array('class' => 'ui-icon ui-icon-check')) . ' ' . setup_gTxt('db_connected'), array('class' => 'alert-block success'));
    if (!($_SESSION['dprefix'] == '' || preg_match('#^[a-zA-Z_][a-zA-Z0-9_]*$#', $_SESSION['dprefix']))) {
        echo graf(span(null, array('class' => 'ui-icon ui-icon-closethick')) . ' ' . setup_gTxt('prefix_bad_characters', array('{dbprefix}' => strong(txpspecialchars($_SESSION['dprefix']))), 'raw'), array('class' => 'alert-block error')) . setup_back_button(__FUNCTION__) . n . '</div>';
        exit;
    }
    if (!($mydb = mysqli_select_db($mylink, $_SESSION['ddb']))) {
        echo graf(span(null, array('class' => 'ui-icon ui-icon-closethick')) . ' ' . setup_gTxt('db_doesnt_exist', array('{dbname}' => strong(txpspecialchars($_SESSION['ddb']))), 'raw'), array('class' => 'alert-block error')) . setup_back_button(__FUNCTION__) . n . '</div>';
        exit;
    }
    $tables_exist = mysqli_query($mylink, "DESCRIBE `" . $_SESSION['dprefix'] . "textpattern`");
    if ($tables_exist) {
        echo graf(span(null, array('class' => 'ui-icon ui-icon-closethick')) . ' ' . setup_gTxt('tables_exist', array('{dbname}' => strong(txpspecialchars($_SESSION['ddb']))), 'raw'), array('class' => 'alert-block error')) . setup_back_button(__FUNCTION__) . n . '</div>';
        exit;
    }
    // On MySQL 5.5.3+ use real UTF-8 tables, if the client supports it.
    $_SESSION['dbcharset'] = "utf8mb4";
    // Lower versions only support UTF-8 limited to 3 bytes per character
    if (mysqli_get_server_version($mylink) < 50503) {
        $_SESSION['dbcharset'] = "utf8";
    } else {
        if (false !== strpos(mysqli_get_client_info($mylink), 'mysqlnd')) {
            // mysqlnd 5.0.9+ required
            if (mysqli_get_client_version($mylink) < 50009) {
                $_SESSION['dbcharset'] = "utf8";
            }
        } else {
            // libmysqlclient 5.5.3+ required
            if (mysqli_get_client_version($mylink) < 50503) {
                $_SESSION['dbcharset'] = "utf8";
            }
        }
    }
    echo graf(span(null, array('class' => 'ui-icon ui-icon-check')) . ' ' . setup_gTxt('using_db', array('{dbname}' => strong(txpspecialchars($_SESSION['ddb']))), 'raw') . ' (' . $_SESSION['dbcharset'] . ')', array('class' => 'alert-block success'));
    echo setup_config_contents() . n . '</div>';
}
开发者ID:scar45,项目名称:textpattern,代码行数:87,代码来源:index.php

示例9: printf

if (empty($expected_methods) && empty($methods)) {
    printf("ok\n");
}
printf("\nClass variables:\n");
$variables = array_keys(get_class_vars(get_class($driver)));
sort($variables);
foreach ($variables as $k => $var) {
    printf("%s\n", $var);
}
printf("\nObject variables:\n");
$variables = array_keys(get_object_vars($driver));
foreach ($variables as $k => $var) {
    printf("%s\n", $var);
}
printf("\nMagic, magic properties:\n");
assert(mysqli_get_client_info() === $driver->client_info);
printf("driver->client_info = '%s'\n", $driver->client_info);
assert(mysqli_get_client_version() === $driver->client_version);
printf("driver->client_version = '%s'\n", $driver->client_version);
assert($driver->driver_version > 0);
printf("driver->driver_version = '%s'\n", $driver->driver_version);
assert(in_array($driver->report_mode, array(MYSQLI_REPORT_ALL, MYSQLI_REPORT_STRICT, MYSQLI_REPORT_ERROR, MYSQLI_REPORT_INDEX, MYSQLI_REPORT_OFF)));
printf("driver->report_mode = '%s'\n", $driver->report_mode);
$driver->report_mode = MYSQLI_REPORT_STRICT;
assert($driver->report_mode === MYSQLI_REPORT_STRICT);
assert(is_bool($driver->embedded));
printf("driver->embedded = '%s'\n", $driver->embedded);
printf("driver->reconnect = '%s'\n", $driver->reconnect);
printf("\nAccess to undefined properties:\n");
printf("driver->unknown = '%s'\n", @$driver->unknown);
print "done!";
开发者ID:alphaxxl,项目名称:hhvm,代码行数:31,代码来源:mysqli_class_mysqli_driver_interface.php

示例10: _getCurrentEnvironment

 /**
  * 获得当前的环境信息
  *
  * @return array
  */
 private function _getCurrentEnvironment()
 {
     $lowestEnvironment = $this->_getLowestEnvironment();
     $mysql_isok = true;
     if (function_exists('mysql_get_client_info')) {
         $mysql = mysql_get_client_info();
     } elseif (function_exists('mysqli_get_client_info')) {
         $mysql = mysqli_get_client_info();
     } else {
         $mysql = 'unknow';
         $mysql_isok = false;
     }
     if (function_exists('gd_info')) {
         $gdinfo = gd_info();
         $gd = $gdinfo['GD Version'];
         $gd_isok = true;
     } else {
         $gd = '2.1.1-dev';
         $gd_isok = true;
     }
     $upload = ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'unknow';
     $space = floor(@disk_free_space(FCPATH) / (1024 * 1024));
     $space = $space ? $space . 'M' : 'unknow';
     return array('os' => PHP_OS, 'php' => phpversion(), 'mysql' => $mysql, 'gd' => $gd, 'upload' => $upload, 'space' => $space, 'os_isok' => true, 'php_isok' => version_compare(phpversion(), $lowestEnvironment['php']) < 0 ? false : true, 'mysql_isok' => $mysql_isok, 'gd_isok' => $gd_isok, 'upload_isok' => intval($upload) >= intval($lowestEnvironment['upload']) ? true : false, 'space_isok' => intval($space) >= intval($lowestEnvironment['space']) ? true : false);
 }
开发者ID:jechiy,项目名称:Startbbs54,代码行数:30,代码来源:install.php

示例11: executemysql

function executemysql($getinfo, $getdumps, $getschema)
{
    //BEGIN GET DB INFO
    global $getDumpsFrom;
    global $curdatetime;
    global $sugar_config;
    global $progress_bar_percent;
    global $sod_guid;
    global $db;
    if ($db->dbType != "mysql") {
        if ($getinfo) {
            sodUpdateProgressBar(MYSQL_INFO_WEIGHT);
        }
        if ($getschema) {
            sodUpdateProgressBar(MYSQL_SCHEMA_WEIGHT);
        }
        if ($getdumps) {
            sodUpdateProgressBar(MYSQL_DUMPS_WEIGHT);
        }
        return;
    }
    $mysqlInfoDir = create_cache_directory("diagnostic/" . $sod_guid . "/diagnostic" . $curdatetime . "/MySQL/");
    //create directory for table definitions
    if ($getschema) {
        $tablesSchemaDir = create_cache_directory("diagnostic/" . $sod_guid . "/diagnostic" . $curdatetime . "/MySQL/TableSchema/");
    }
    //BEGIN GET MYSQL INFO
    //make sure they checked the box to get basic info
    if ($getinfo) {
        ob_start();
        echo "MySQL Version: " . (function_exists('mysqli_get_client_info') ? @mysqli_get_client_info() : @mysql_get_client_info()) . "<BR>";
        echo "MySQL Host Info: " . (function_exists('mysqli_get_host_info') ? @mysqli_get_host_info($db->getDatabase()) : @mysql_get_host_info()) . "<BR>";
        echo "MySQL Server Info: " . (function_exists('mysqli_get_client_info') ? @mysqli_get_client_info() : @mysql_get_client_info()) . "<BR>";
        echo "MySQL Client Encoding: " . (function_exists('mysqli_character_set_name') ? @mysqli_character_set_name($db->getDatabase()) : @mysql_client_encoding()) . "<BR>";
        /* Uncomment to get current processes as well
           echo "<BR>MySQL Processes<BR>";
           $res = $db->query('SHOW PROCESSLIST');
           echo "<table border=\"1\"><tr><th>Id</th><th>Host</th><th>db</th><th>Command</th><th>Time</th></tr>";
           if($db->getRowCount($res) > 0)
           {
             while($row = $db->fetchByAssoc($res))
             {
               printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
                      $row['Id'], $row['Host'], $row['db'], $row['Command'], $row['Time']
                      );
             }
             echo "</table><br>";
           }
           else
           {
             echo "</table>";
             echo "No processes running<br>";
           }
           */
        echo "<BR>MySQL Character Set Settings<BR>";
        $res = $db->query("show variables like 'character\\_set\\_%'");
        echo "<table border=\"1\"><tr><th>Variable Name</th><th>Value</th></tr>";
        while ($row = $db->fetchByAssoc($res)) {
            printf("<tr><td>%s</td><td>%s</td></tr>", $row['Variable_name'], $row['Value']);
        }
        echo "</table>";
        $content = ob_get_contents();
        ob_clean();
        $handle = sugar_fopen($mysqlInfoDir . "MySQL-General-info.html", "w");
        if (fwrite($handle, $content) === FALSE) {
            echo "Cannot write to file " . $mysqlInfoDir . "_MySQL-General-info.html<br>";
        }
        fclose($handle);
        //BEGIN UPDATING PROGRESS BAR
        sodUpdateProgressBar(MYSQL_INFO_WEIGHT);
        //END UPDATING PROGRESS BAR
    }
    //END GET MYSQL INFO
    if ($getschema) {
        //BEGIN GET ALL TABLES SCHEMAS
        $all_tables = $db->getTablesArray();
        global $theme_path;
        ob_start();
        echo "<style>";
        echo file_get_contents($theme_path . "style.css");
        echo "</style>";
        foreach ($all_tables as $tablename) {
            //setting up table header for each file
            echo "<table border=\"0\" cellpadding=\"0\" class=\"tabDetailView\">";
            echo "<tr>MySQL " . $tablename . " Definitions:</tr>" . "<tr><td class=\"tabDetailViewDL\"><b>Field</b></td>" . "<td class=\"tabDetailViewDL\">Type</td>" . "<td class=\"tabDetailViewDL\">Null</td>" . "<td class=\"tabDetailViewDL\">Key</td>" . "<td class=\"tabDetailViewDL\">Default</td>" . "<td class=\"tabDetailViewDL\">Extra</td></tr>";
            $describe = $db->query("describe " . $tablename);
            while ($inner_row = $db->fetchByAssoc($describe)) {
                $inner_row = array_values($inner_row);
                echo "<tr><td class=\"tabDetailViewDF\"><b>" . $inner_row[0] . "</b></td>";
                echo "<td class=\"tabDetailViewDF\">" . $inner_row[1] . "</td>";
                echo "<td class=\"tabDetailViewDF\">" . $inner_row[2] . "</td>";
                echo "<td class=\"tabDetailViewDF\">" . $inner_row[3] . "</td>";
                echo "<td class=\"tabDetailViewDF\">" . $inner_row[4] . "</td>";
                echo "<td class=\"tabDetailViewDF\">" . $inner_row[5] . "</td></tr>";
            }
            echo "</table>";
            echo "<BR><BR>";
        }
        $content = ob_get_contents();
        ob_clean();
//.........这里部分代码省略.........
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:101,代码来源:DiagnosticRun.php

示例12: printf

<?php

$test_table_name = 'test_mysqli_driver_table_1';
require "table.inc";
if (!is_object($driver = new mysqli_driver())) {
    printf("[001] Failed to create mysqli_driver object\n");
}
$client_info = mysqli_get_client_info();
if (($tmp = $driver->client_info) !== $client_info) {
    printf("[002] Expecting %s/%s, got %s/%s\n", gettype($client_info), $client_info, gettype($tmp), $tmp);
}
$client_version = mysqli_get_client_version();
if (($tmp = $driver->client_version) !== $client_version) {
    printf("[003] Expecting %s/%s, got %s/%s\n", gettype($client_version), $client_version, gettype($tmp), $tmp);
}
if (!is_int($tmp = $driver->driver_version) || 0 == $tmp) {
    printf("[004] Expecting int/any, got %s/%s\n", gettype($tmp), $tmp);
}
$all_modes = array(MYSQLI_REPORT_INDEX, MYSQLI_REPORT_ERROR, MYSQLI_REPORT_STRICT, MYSQLI_REPORT_ALL, MYSQLI_REPORT_OFF);
$report_mode = $driver->report_mode;
if (!is_int($report_mode)) {
    printf("[005] Expecting int/any, got %s/%s\n", gettype($report_mode), $report_mode);
}
if (!in_array($report_mode, $all_modes)) {
    printf("[006] Illegal report mode returned? Got %s, expected %s\n", $report_mode, implode(', ', $all_modes));
}
$driver->report_mode = MYSQLI_REPORT_STRICT;
$ok = false;
try {
    if ($link = my_mysqli_connect($host, $user . 'unknown_really', $passwd . 'non_empty', $db, $port, $socket)) {
        printf("[007] Can connect to the server using host=%s, user=%s, passwd=***non_empty, dbname=%s, port=%s, socket=%s\n", $host, $user . 'unknown_really', $db, $port, $socket);
开发者ID:badlamer,项目名称:hhvm,代码行数:31,代码来源:mysqli_driver.php

示例13: PMA_DBI_get_client_info

/**
 * returns a string that represents the client library version
 * @uses    mysqli_get_client_info()
 * @return  string          MySQL client library version
 */
function PMA_DBI_get_client_info()
{
    return mysqli_get_client_info();
}
开发者ID:alex-k,项目名称:velotur,代码行数:9,代码来源:mysqli.dbi.lib.php

示例14: bps_mysqli_get_client_info

 function bps_mysqli_get_client_info()
 {
     if (function_exists('mysqli_get_client_info')) {
         return mysqli_get_client_info();
     }
 }
开发者ID:konsultanblog,项目名称:tagamon,代码行数:6,代码来源:system-info_1.php

示例15: mysql_get_client_info

 function mysql_get_client_info()
 {
     return mysqli_get_client_info($GLOBALS['_MySQLCON_']);
 }
开发者ID:OOPS-ORG-PHP,项目名称:mysql-extension-wrapper,代码行数:4,代码来源:mysql-wrapper.php


注:本文中的mysqli_get_client_info函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。