• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mysqli_get_server_info函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: connect

 /**
 +----------------------------------------------------------
 * 连接数据库方法
 +----------------------------------------------------------
 * @access public 
 +----------------------------------------------------------
 * @throws ThinkExecption
 +----------------------------------------------------------
 */
 public function connect($config = '', $linkNum = 0)
 {
     if (!isset($this->linkID[$linkNum])) {
         if (empty($config)) {
             $config = $this->config;
         }
         $this->linkID[$linkNum] = mysqli_connect($config['hostname'], $config['username'], $config['password'], $config['database'], $config['hostport']);
         if (!$this->linkID[$linkNum]) {
             throw_exception(mysqli_connect_error());
             return false;
         }
         if ($this->autoCommit) {
             mysqli_autocommit($this->linkID[$linkNum], true);
         } else {
             mysqli_autocommit($this->linkID[$linkNum], false);
         }
         $this->dbVersion = mysqli_get_server_info($this->linkID[$linkNum]);
         if ($this->dbVersion >= "4.1") {
             //使用UTF8存取数据库 需要mysql 4.1.0以上支持
             mysqli_query($this->linkID[$linkNum], "SET NAMES '" . C('DB_CHARSET') . "'");
         }
         // 标记连接成功
         $this->connected = true;
         //注销数据库安全信息
         if (1 != C('DB_DEPLOY_TYPE')) {
             unset($this->config);
         }
     }
     return $this->linkID[$linkNum];
 }
开发者ID:BGCX262,项目名称:zxzjob-svn-to-git,代码行数:39,代码来源:DbMysqli.class.php


示例2: connect

 function connect($iteration = 0, $rerunError = null)
 {
     if ($iteration > $this->reconnectIterations) {
         $e = new BrDBConnectionError($rerunError);
         br()->triggerSticky('db.connectionError', $e);
         throw $e;
     }
     $hostName = br($this->config, 'hostname');
     $dataBaseName = br($this->config, 'name');
     $userName = br($this->config, 'username');
     $password = br($this->config, 'password');
     $port = br($this->config, 'port');
     try {
         if ($this->__connection = @mysqli_connect($hostName, $userName, $password, $dataBaseName, $port)) {
             if (br($this->config, 'charset')) {
                 $this->runQuery('SET NAMES ?', $this->config['charset']);
             }
             $this->version = mysqli_get_server_info($this->__connection);
             $this->triggerSticky('after:connect');
             br()->triggerSticky('after:db.connect');
         } else {
             throw new Exception(mysqli_connect_errno() . ': ' . mysqli_connect_error());
         }
     } catch (Exception $e) {
         if (preg_match('/Unknown database/', $e->getMessage()) || preg_match('/Access denied/', $e->getMessage())) {
             br()->triggerSticky('db.connectionError', $e);
             throw new BrDBConnectionError($e->getMessage());
         } else {
             $this->__connection = null;
             usleep(250000);
             $this->connect($iteration + 1, $e->getMessage());
         }
     }
     return $this->__connection;
 }
开发者ID:jagermesh,项目名称:bright,代码行数:35,代码来源:BrMySQLiDBProvider.php


示例3: cleanOrphan

 /**
  * Clean orphan objects against linked objects
  *
  * @param  string $table_link   table of linked object for JOIN; deprecated, for backward compatibility
  * @param  string $field_link   field of linked object for JOIN; deprecated, for backward compatibility
  * @param  string $field_object field of current object for JOIN; deprecated, for backward compatibility
  * @return bool   true on success
  */
 public function cleanOrphan($table_link = '', $field_link = '', $field_object = '')
 {
     if (!empty($table_link)) {
         $this->handler->table_link = $table_link;
     }
     if (!empty($field_link)) {
         $this->handler->field_link = $field_link;
     }
     if (!empty($field_object)) {
         $this->handler->field_object = $field_object;
     }
     if (empty($this->handler->field_object) || empty($this->handler->table_link) || empty($this->handler->field_link)) {
         trigger_error("The link information is not set for '" . get_class($this->handler) . "' yet.", E_USER_WARNING);
         return null;
     }
     /**
      * for MySQL 4.1+
      */
     if (version_compare(mysqli_get_server_info($this->handler->db->conn), '4.1.0', 'ge')) {
         $sql = "DELETE FROM `{$this->handler->table}`" . " WHERE (`{$this->handler->field_object}` NOT IN ( SELECT DISTINCT `{$this->handler->field_link}` FROM `{$this->handler->table_link}`) )";
     } else {
         // for 4.0+
         $sql = "DELETE `{$this->handler->table}` FROM `{$this->handler->table}`" . " LEFT JOIN `{$this->handler->table_link}` AS aa ON `{$this->handler->table}`.`{$this->handler->field_object}` = aa.`{$this->handler->field_link}`" . " WHERE (aa.`{$this->handler->field_link}` IS NULL)";
     }
     if (!($result = $this->handler->db->queryF($sql))) {
         return false;
     }
     return true;
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:37,代码来源:sync.php


示例4: mysql_server_version

 /**
  * get MySQL server version
  *
  * @param null|XoopsDatabase|mysqli $conn
  *
  * @return string
  */
 public function mysql_server_version($conn = null)
 {
     if (null === $conn) {
         $conn = $this->db->conn;
     }
     return mysqli_get_server_info($conn);
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:14,代码来源:object.php


示例5: getAttribute

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


示例6: 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


示例7: getList

 public function getList()
 {
     if (!$this->_list) {
         $server_software = !empty($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : JText::_('n/a');
         $rows = array(array('setting' => JText::_('PHP Built On'), 'value' => php_uname()), array('setting' => JText::_('Database Version'), 'value' => mysqli_get_server_info($this->getService('koowa:database.adapter.mysqli')->getConnection())), array('setting' => JText::_('Database Collation'), 'value' => $this->getService('com://admin/extensions.database.table.plugins')->getSchema()->collation), array('setting' => JText::_('PHP Version'), 'value' => phpversion()), array('setting' => JText::_('Web Server'), 'value' => $server_software), array('setting' => JText::_('WebServer to PHP Interface'), 'value' => php_sapi_name()), array('setting' => JText::_('Nooku Server Version'), 'value' => Koowa::getVersion()), array('setting' => JText::_('User Agent'), 'value' => $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES));
         $this->_list = $this->getService('com://admin/info.database.rowset.system')->addData($rows, false);
     }
     return $this->_list;
 }
开发者ID:JSWebdesign,项目名称:intranet-platform,代码行数:9,代码来源:system.php


示例8: show_info

 private function show_info()
 {
     $total_space = round(@disk_total_space(".") / (1024 * 1024));
     $free_space = round(@disk_free_space(".") / (1024 * 1024));
     $already_used = round($total_space - $free_space);
     $already_used_percent = round(($total_space - $free_space) / $total_space * 100);
     $server_info = array('os' => PHP_OS, 'server_software' => $_SERVER["SERVER_SOFTWARE"], 'php' => php_sapi_name(), 'mysqli' => mysqli_get_server_info($this->model->getDb()), 'canon_version' => 1.0 . "&nbsp;&nbsp;&nbsp; [<a href='http://phpgoto.com' target='_blank'>访问官网</a>]", 'upload' => ini_get('upload_max_filesize'), 'total_space' => $total_space, 'free_space' => $free_space, 'already_used' => $already_used, 'already_used_percent' => $already_used_percent);
     //dump($server_info);
     return $server_info;
 }
开发者ID:skywingfs,项目名称:kmhotel,代码行数:10,代码来源:admin_controller.php


示例9: _db_set_charset

 function _db_set_charset($charset, $collation)
 {
     if (!isset($this->use_set_names)) {
         $this->use_set_names = version_compare(mysqli_get_server_info($this->conn_id), '5.0.7', '>=') ? FALSE : TRUE;
     }
     if ($this->use_set_names === TRUE) {
         return @mysqli_query($this->conn_id, "SET NAMES '" . $this->escape_str($charset) . "' COLLATE '" . $this->escape_str($collation) . "'");
     } else {
         return @mysqli_set_charset($this->conn_id, $charset);
     }
 }
开发者ID:pepegarcia,项目名称:publicidadoficialdemo-1,代码行数:11,代码来源:mysqli_driver.php


示例10: isServerSupportingSavePoints

 protected final function isServerSupportingSavePoints()
 {
     if ($this->supportsSavePoints === null) {
         $version = mysqli_get_server_info($this->link);
         if (version_compare($version, '5.0.3') >= 0) {
             $this->supportsSavePoints = true;
         } else {
             $this->supportsSavePoints = false;
         }
     }
     return $this->supportsSavePoints;
 }
开发者ID:xiaoguizhidao,项目名称:extensiongsd,代码行数:12,代码来源:Driver.php


示例11: versionMysql

 function versionMysql()
 {
     $test = is_null($___mysqli_res = mysqli_get_server_info($GLOBALS["mysqli"])) ? false : $___mysqli_res;
     // On regarde si c'est une version 4 ou 5
     $version = mb_substr($test, 0, 1);
     if ($version == 4 or $version == 5) {
         $retour = '<span style="color: green;">' . (is_null($___mysqli_res = mysqli_get_server_info($GLOBALS["mysqli"])) ? false : $___mysqli_res) . '</span>';
     } else {
         $retour = '<span style="color: red;">' . (is_null($___mysqli_res = mysqli_get_server_info($GLOBALS["mysqli"])) ? false : $___mysqli_res) . '(version ancienne !)</span>';
     }
     return $retour;
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:12,代码来源:serveur_infos.class.php


示例12: connect

 private function connect()
 {
     $this->id = mysqli_connect($this->config['location'], $this->config['user'], $this->config['pass'], $this->config['name']);
     if (!$this->id) {
         if ($this->config['show_error'] == 1) {
             $this->display_error(mysqli_connect_error(), '1', 'connect');
         } else {
             return false;
         }
     }
     $this->mysql_version = mysqli_get_server_info($this->id);
     mysqli_query($this->id, "SET NAMES '" . $this->collate . "'");
 }
开发者ID:Japing,项目名称:pcp-cs,代码行数:13,代码来源:mysqli.class.php


示例13: serverVers

 function serverVers()
 {
     // cache for faster execution:
     if (is_array($this->_drvSrvVersArr)) {
         return $this->_drvSrvVersArr;
     }
     $orig = @mysqli_get_server_info($this->_conn);
     $vstr = $this->_findVers($orig);
     $vint = @mysqli_get_server_version($this->_conn);
     $vArr = array('orig' => $orig, 'vstr' => $vstr, 'vint' => $vint);
     $this->_drvSrvVersArr = $vArr;
     return $vArr;
 }
开发者ID:rkania,项目名称:GS3,代码行数:13,代码来源:mysqli.php


示例14: mod_getMysqlVersion

/**
 * get MySQL server version
 *
 * In some cases mysql_get_client_info is required instead
 *
 * @param null $conn
 *
 * @return     string
 */
function mod_getMysqlVersion($conn = null)
{
    global $xoopsDB;
    static $mysql_version;
    if (isset($mysql_version)) {
        return $mysql_version;
    }
    if (null === $conn) {
        $conn = $xoopsDB->conn;
    }
    $mysql_version = mysqli_get_server_info($conn);
    return $mysql_version;
}
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:22,代码来源:functions.php


示例15: vbseodb_connect

 function vbseodb_connect($server, $user, $password, $usepconnect, $tableprefix = '', $database, $port)
 {
     global $vbulletin, $DB_site, $config;
     if (!defined('TABLE_PREFIX')) {
         define('TABLE_PREFIX', $tableprefix);
     }
     if (0 == $this->link_id) {
         $this->mysqli = $config['Database']['dbtype'] == 'mysqli';
         if (is_object($vbulletin) && isset($vbulletin->db) && (isset($vbulletin->db->connection_slave) && ($dlnk = $vbulletin->db->connection_slave) || isset($vbulletin->db->connection_master) && ($dlnk = $vbulletin->db->connection_master)) && (@is_object($dlnk) ? @mysqli_get_server_info($dlnk) : @mysql_get_server_info($dlnk))) {
             $this->link_id = $dlnk;
         } else {
             if (isset($DB_site) && $DB_site->link_id) {
                 $this->link_id = $DB_site->link_id;
             } else {
                 $this->own_link = 1;
                 if ($usepconnect == 1) {
                     $this->link_id = @mysql_pconnect($server . ($port && $port != 3306 ? ':' . $port : ''), $user, $password);
                 } else {
                     if ($this->mysqli) {
                         $this->link_id = mysqli_init();
                         @mysqli_real_connect($this->link_id, $server, $user, $password, $database, $port);
                     } else {
                         $this->link_id = @mysql_connect($server . ($port && $port != 3306 ? ':' . $port : ''), $user, $password);
                     }
                 }
             }
         }
         if (!$this->link_id) {
             return false;
         }
         $this->mysqli = @is_object($this->link_id);
         if ($this->mysqli) {
             $this->funcs = array('get_server_info' => 'mysqli_get_server_info', 'select_db' => 'mysqli_select_db', 'query' => 'mysqli_query', 'affected_rows' => 'mysqli_affected_rows', 'num_rows' => 'mysqli_num_rows', 'free_result' => 'mysqli_free_result', 'fetch_array' => 'mysqli_fetch_array', 'fetch_assoc' => 'mysqli_fetch_assoc', 'close' => 'mysqli_close');
         } else {
             $this->funcs = array('get_server_info' => 'mysql_get_server_info', 'select_db' => 'mysql_select_db', 'query' => 'mysql_query', 'affected_rows' => 'mysql_affected_rows', 'num_rows' => 'mysql_num_rows', 'free_result' => 'mysql_free_result', 'fetch_array' => 'mysql_fetch_array', 'fetch_assoc' => 'mysql_fetch_assoc', 'close' => 'mysql_close');
             $this->vbseodb_select_db($database);
         }
         if (isset($config['Mysqli']['charset']) && ($charset = $config['Mysqli']['charset'])) {
             if ($this->mysqli && function_exists('mysqli_set_charset')) {
                 mysqli_set_charset($this->link_id, $charset);
             } else {
                 $this->vbseodb_query("SET NAMES {$charset}");
             }
         }
         $this->mysql_version = function_exists($this->funcs['get_server_info']) ? $this->funcs['get_server_info']($this->link_id) : '';
         return true;
     }
 }
开发者ID:holandacz,项目名称:nb4,代码行数:48,代码来源:functions_vbseo_db.php


示例16: xtc_db_connect_installer

function xtc_db_connect_installer($server, $username, $password, $database, $link = 'db_link')
{
    global ${$link}, $db_error;
    $db_error = false;
    if (!$server) {
        $db_error = 'No Server selected.';
        return false;
    }
    ${$link} = @mysqli_connect($server, $username, $password, $database) or $db_error = mysqli_error(${$link});
    //vr - 2010-01-01 - Disable "STRICT" mode for MySQL 5!
    if (version_compare(@mysqli_get_server_info(${$link}), '5.0.0', '>=')) {
        @mysqli_query(${$link}, "SET SESSION sql_mode=''");
    }
    mysqli_set_charset(${$link}, 'utf8');
    return ${$link};
}
开发者ID:shophelfer,项目名称:shophelfer.com-shop,代码行数:16,代码来源:xtc_db_connect_installer.inc.php


示例17: getMySQLInfo

 public static function getMySQLInfo()
 {
     if (isset(self::$_aMySQLInfo)) {
         return self::$_aMySQLInfo;
     }
     global $wpdb;
     $_aOutput = array('Version' => isset($wpdb->use_mysqli) && $wpdb->use_mysqli ? @mysqli_get_server_info($wpdb->dbh) : @mysql_get_server_info());
     foreach ((array) $wpdb->get_results("SHOW VARIABLES", ARRAY_A) as $_iIndex => $_aItem) {
         $_aItem = array_values($_aItem);
         $_sKey = array_shift($_aItem);
         $_sValue = array_shift($_aItem);
         $_aOutput[$_sKey] = $_sValue;
     }
     self::$_aMySQLInfo = $_aOutput;
     return self::$_aMySQLInfo;
 }
开发者ID:sultann,项目名称:admin-page-framework,代码行数:16,代码来源:AdminPageFramework_WPUtility_SystemInformation.php


示例18: fetch_anon_server_data

 /**
  * Fetch Anonymous Server Data
  *
  * @access	public
  * @return	array
  */
 function fetch_anon_server_data()
 {
     $CI =& get_instance();
     $CI->db->select('site_system_preferences');
     $query = $CI->db->get_where('sites', array('site_id' => 1));
     $site_url = '';
     $path_info_support = 'n';
     if ($query->num_rows() > 0) {
         $prefs = unserialize(base64_decode($query->row('site_system_preferences')));
         $site_url = $prefs['site_url'];
         $path_info_support = $prefs['force_query_string'] == 'n' ? 'y' : 'n';
     }
     // Get a list of add-ons in their third_party folder
     $CI->load->helper('directory');
     $mysql_info = $CI->db->dbdriver == 'mysqli' ? mysqli_get_server_info($CI->db->conn_id) : mysql_get_server_info();
     return array('anon_id' => md5($site_url), 'os' => preg_replace("/.*?\\((.*?)\\).*/", '\\1', $_SERVER['SERVER_SOFTWARE']), 'server_software' => preg_replace("/(.*?)\\(.*/", '\\1', $_SERVER['SERVER_SOFTWARE']), 'php_version' => phpversion(), 'php_extensions' => json_encode(get_loaded_extensions()), 'mysql_version' => preg_replace("/(.*?)\\-.*/", "\\1", $mysql_info), 'path_info_support' => $path_info_support, 'addons' => json_encode(directory_map(PATH_THIRD, 1)), 'forums' => $CI->config->item('forum_is_installed') == "y" ? 'y' : 'n', 'msm' => $CI->config->item('multiple_sites_enabled') == "y" ? 'y' : 'n');
 }
开发者ID:vigm,项目名称:advancedMD,代码行数:23,代码来源:Survey.php


示例19: connect

 function connect()
 {
     $this->conn = mysqli_connect($this->host, $this->user, $this->password);
     mysqli_select_db($this->conn, $this->dbname);
     if (function_exists('mysqli_set_charset')) {
         mysqli_set_charset($this->conn, $this->connection_charset);
     }
     $this->dbVersion = 3.23;
     // assume version 3.23
     if (function_exists("mysqli_get_server_info")) {
         $ver = mysqli_get_server_info($this->conn);
         $this->dbMODx = version_compare($ver, "4.0.2");
         $this->dbVersion = (double) $ver;
         // Typecasting (float) instead of floatval() [PHP < 4.2]
     }
     mysqli_query($this->conn, "{$this->connection_method} {$this->connection_charset}");
 }
开发者ID:Fess7,项目名称:evolution,代码行数:17,代码来源:sqlParser.class.php


示例20: connect

 function connect()
 {
     if (defined('USE_PCONNECT') && USE_PCONNECT == 'true') {
         $connect_function = 'mysqli_pconnect';
     } else {
         $connect_function = 'mysqli_connect';
     }
     if ($this->link = @$connect_function($this->server, $this->username, $this->password)) {
         $this->setConnected(true);
         if (version_compare(mysqli_get_server_info($this->link), '5.0.2') >= 0) {
             $this->simpleQuery('set session sql_mode="STRICT_ALL_TABLES"');
         }
         return true;
     } else {
         $this->setError(mysqli_connect_error(), mysqli_connect_errno());
         return false;
     }
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:18,代码来源:mysqli.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mysqli_get_server_version函数代码示例发布时间:2022-05-15
下一篇:
PHP mysqli_get_proto_info函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap