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


PHP mysql_get_proto_info函数代码示例

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


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

示例1: castMysqlLink

 public static function castMysqlLink($h, array $a, Stub $stub, $isNested)
 {
     $a['host'] = mysql_get_host_info($h);
     $a['protocol'] = mysql_get_proto_info($h);
     $a['server'] = mysql_get_server_info($h);
     return $a;
 }
开发者ID:saj696,项目名称:pipe,代码行数:7,代码来源:ResourceCaster.php

示例2: EchoConnInfo

function EchoConnInfo($conn)
{
	$str = GetBlock(mysql_get_host_info($conn));
	$str .= GetBlock(mysql_get_proto_info($conn));
	$str .= GetBlock(mysql_get_server_info($conn));
	echo $str;
}
开发者ID:xl7dev,项目名称:WebShell,代码行数:7,代码来源:ntunnel_mysql.php

示例3: showSystemStatus

 /**
  * 
  * 	Systemstatus anzeigen
  * 
  */
 public function showSystemStatus($ErrorString = "", $StatusString = "")
 {
     //if(!Controler_Main::getInstance()->isUserLoggedIn())//if( $this->User->getUserLevel() < BACKEND_USERLEVEL )
     if (Controler_Main::getInstance()->getUserLevel() < BACKEND_USERLEVEL) {
         $ControlerStart = new Controler_Start();
         $ControlerStart->start();
         return false;
     }
     $Request = new Request();
     /*
     $SystemInformationFinder= new SystemInformationFinder();
     $MySql = $SystemInformationFinder->mysqlVersion();
     $MySqlVersion = $MySql[0]['s_MySqlVersion'];
     */
     $PHPVersion = phpversion();
     $WebserverVersion = $_SERVER['SERVER_SOFTWARE'];
     $WebserverVersion = "<div class='befehlskontainer' >" . str_replace(" ", "</div><div class='befehlskontainer' >", $WebserverVersion) . "</div>";
     $WebserverConfig = "<div class='befehlskontainer' >:T_SERVER_NAME:: " . $_SERVER['SERVER_NAME'] . "</div><div class='befehlskontainer' >";
     $WebserverConfig .= ":T_SERVER_ADDR:: " . $_SERVER['SERVER_ADDR'] . "</div><div class='befehlskontainer' >";
     $WebserverConfig .= ":T_SERVER_PORT:: " . $_SERVER['SERVER_PORT'] . "</div><div class='befehlskontainer' >";
     $WebserverConfig .= ":T_REMOTE_ADDR:: " . $_SERVER['REMOTE_ADDR'] . "</div><div class='befehlskontainer' >";
     $WebserverConfig .= ":T_DOCUMENT_ROOT:: " . $_SERVER['DOCUMENT_ROOT'] . "</div><div class='befehlskontainer' >";
     $WebserverConfig .= ":T_SERVER_ADMIN:: " . $_SERVER['SERVER_ADMIN'] . "</div>";
     $Template = Template::getInstance("tpl_BE_SystemStatus.php");
     $Template->assign("UserId", Controler_Main::getInstance()->getUser()->getId());
     $Template->assign("WebserverConfig", $WebserverConfig);
     $Template->assign("WebserverVersion", $WebserverVersion);
     $Template->assign("PHPVersion", $PHPVersion);
     $Template->assign("MySqlVersion", mysql_get_server_info());
     $Template->assign("MySqlClientInfo", mysql_get_client_info());
     $Template->assign("MySqlProtInfo", mysql_get_proto_info());
     $Template->assign("MySqlHostInfo", mysql_get_host_info());
     $Template->render();
 }
开发者ID:0xF3ERROR,项目名称:Home-Control,代码行数:39,代码来源:cls_Controler_Backend.php

示例4: get

 /**
  * @inheritdoc
  */
 public function get(VariableWrapper $data)
 {
     if (!$this->supports($data)) {
         throw new \Ladybug\Exception\InvalidInspectorClassException();
     }
     /** @var $collection CollectionType */
     $collection = $this->extendedTypeFactory->factory('collection', $this->level);
     $var = $data->getData();
     $collection->add($this->createTextType(mysql_get_host_info($var), 'Host info'));
     $collection->add($this->createTextType(mysql_get_proto_info($var), 'Protocol version'));
     $collection->add($this->createTextType(mysql_get_server_info($var), 'Server version'));
     $collection->setTitle('MySQL connection');
     $collection->setLevel($this->level);
     return $collection;
 }
开发者ID:raulfraile,项目名称:ladybug-plugin-extra,代码行数:18,代码来源:MysqlLink.php

示例5: connect

 public function connect($dbIP, $dbUser, $dbPass, $dbName, $dbPort = null)
 {
     // check parameters
     if ($dbIP == '') {
         die('<b>ERROR:</b> no database host provided... <b>system/libs/phpDB.php, line 32</b>');
     }
     if ($dbName == '') {
         die('<b>ERROR:</b> no database name provided... <b>system/libs/phpDB.php, line 33</b>');
     }
     if ($dbUser == '') {
         die('<b>ERROR:</b> no database user provided... <b>system/libs/phpDB.php, line 34</b>');
     }
     //if ($dbPass == '') die('no database password provided');
     // connect
     if ($this->dbType == 'postgres') {
         $this->dbConn = pg_connect("host={$dbIP} " . ($dbPort != null ? "port={$dbPort} " : "") . "dbname={$dbName} user={$dbUser} password={$dbPass}");
         if (!$this->dbConn) {
             $this->dbConn = null;
             print "<b>ERROR:</b> Cannot connect to postgres.<br>";
             return false;
         }
         $this->dbVersion = pg_version($this->dbConn);
         $this->dbVersion['host'] = pg_host($this->dbConn);
     }
     if ($this->dbType == 'mysql') {
         $this->dbConn = mysql_connect($dbIP . ($dbPort != null ? ":" . $dbPort : ""), $dbUser, $dbPass);
         if (!$this->dbConn) {
             $this->dbConn = null;
             print "<b>ERROR:</b> Cannot connect to mysql.<br>";
             return false;
         }
         mysql_select_db($dbName);
         $this->dbVersion = array();
         $this->dbVersion['client'] = mysql_get_client_info();
         $this->dbVersion['protocol'] = mysql_get_proto_info($this->dbConn);
         $this->dbVersion['server'] = mysql_get_server_info($this->dbConn);
         $this->dbVersion['host'] = mysql_get_host_info($this->dbConn);
     }
 }
开发者ID:visapi,项目名称:Web-2.0-File-Manager,代码行数:39,代码来源:phpDB.php

示例6: array

/********************************************
 * @Created on March, 2011 * @Package: Ndotdeals unlimited v2.2 
 * @Author: NDOT
 * @URL : http://www.ndot.in
 ********************************************/
require_once './init.php';
$gDesc = $gXpLang['manage_database_backups'];
$gPage = $gXpLang['database_backup'];
$gPath = 'database-backup';
require_once 'header.php';
$buttons = array(0 => array('name' => 'backup', 'img' => $gXpConfig['xpurl'] . 'admin/images/save_f2.gif', 'text' => $gXpLang['backup']));
if ($_POST['task'] == 'backup' || $_POST['backup']) {
    $toptext = "# MySQL variables:\n";
    $toptext .= "# \tMySQL client info: " . mysql_get_client_info() . "\n";
    $toptext .= "# \tMySQL host info: " . mysql_get_host_info() . "\n";
    $toptext .= "# \tMySQL protocol version: " . mysql_get_proto_info() . "\n";
    $toptext .= "# \tMySQL server version: " . mysql_get_server_info() . "\n";
    $toptext .= "\n\n\n";
    /** database backup **/
    /** defines what to dump **/
    if ("structure" == $_POST['db_op']) {
        $sql = makeDbStructureBackup();
    } elseif ("data" == $_POST['db_op']) {
        $sql = makeDbDataBackup();
    } elseif ("full" == $_POST['db_op']) {
        $sql = makeDbBackup();
    }
    $sql = $copyright . $sql;
    /** saves to server **/
    if ("server" == $_POST['savetype']) {
        $sqlfile = $gXpConfig['basepath'] . '/' . $gXpConfig['xpdir'] . $gXpConfig['backup'] . 'db_' . date("Y-m-d") . '.sql';
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:database-backup.php

示例7: getProtoInfo

 /**
  * Returns the version of the MySQL protocol used
  *
  * @param resource|null $link mysql link
  *
  * @return int version of the MySQL protocol used
  */
 public function getProtoInfo($link)
 {
     return mysql_get_proto_info($link);
 }
开发者ID:TheBlackBloodyUnicorn,项目名称:pico_wanderblog,代码行数:11,代码来源:DBIMysql.class.php

示例8: window_title

     break;
 case 'mysqlinfo':
     echo window_title($database_window_title . "MySQL - Info");
     echo "<div class='row'><div class='row'><label class='etiquette'>" . $msg[sql_info_notices] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from notices") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_exemplaires] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from exemplaires") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_bulletins] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from bulletins") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_authors] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from authors") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_publishers] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from publishers") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_empr] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from empr") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_pret] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from pret") . "</div>";
     echo "<div class='row'><label class='etiquette'>" . $msg[sql_info_pret_archive] . "</label></div>\n\t\t\t  <div class='row'>" . pmb_sql_value("select count(*) as nb from pret_archive") . "</div>";
     echo "<hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Database name, host and user</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . DATA_BASE . " on " . SQL_SERVER . ", user=" . USER_NAME . "\n\t\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Server Information</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . mysql_get_server_info() . "\n\t\t\t\t\t</div><hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Client Information</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . mysql_get_client_info() . "\n\t\t\t\t\t</div><hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Host Information</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . mysql_get_host_info() . "\n\t\t\t\t\t</div><hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Protocol Information</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . mysql_get_proto_info() . "\n\t\t\t\t\t</div><hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Stat. Information</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'>\n\t\t\t\t\t" . str_replace('  ', '<br />', mysql_stat()) . "</div><hr />";
     echo "<div class='row'>\n\t\t\t\t<label class='etiquette' >MySQL Variables</label>\n\t\t\t\t</div>\n\t\t\t  <div class='row'><table>";
     $result = mysql_query('SHOW VARIABLES', $dbh);
     $parity = 0;
     while ($row = mysql_fetch_assoc($result)) {
         if ($parity % 2) {
             $pair_impair = "even";
         } else {
             $pair_impair = "odd";
         }
         $parity += 1;
         echo "<tr class='{$pair_impair}'><td>" . $row['Variable_name'] . "</td><td>" . $row['Value'] . "</td></tr>";
     }
     echo "</table></div>";
     break;
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:mysql.inc.php

示例9: getProtocolInfo

 /**
  * get protocol info.
  * returns the mysql protocol version
  *
  * @access public
  * @return string 
  */
 public function getProtocolInfo()
 {
     if ($this->connect()) {
         return mysql_get_proto_info($this->_connection);
     }
     return null;
 }
开发者ID:BlackIkeEagle,项目名称:hersteldienst-devolder,代码行数:14,代码来源:MySql.php

示例10: database_get_proto_info

 function database_get_proto_info()
 {
     return function_exists('mysql_get_proto_info') ? mysql_get_proto_info($this->database_connection) : FALSE;
 }
开发者ID:amitjoy,项目名称:nitd-network,代码行数:4,代码来源:class_database.php

示例11: MySQL_Get_Proto_Info_Test

 /**
  * Test mysql_get_proto_info
  *
  * @return boolean
  */
 public function MySQL_Get_Proto_Info_Test()
 {
     $str1 = mysql_get_proto_info();
     $str2 = $this->_object->mysql_get_proto_info();
     return $str1 === $str2;
 }
开发者ID:ReKungPaw,项目名称:mysql,代码行数:11,代码来源:MySQL_Test.php

示例12: getProtoInfo

 function getProtoInfo()
 {
     /* 取得 MySQL 协议信息 */
     return mysql_get_proto_info($this->LinkId);
 }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:5,代码来源:db.php

示例13: mysql_server

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

示例14: die

if (defined('WB_PATH') == false) {
    die("Cannot access this file directly");
}
if (is_object($database->DbHandle)) {
    $title = "MySQLi Info";
    $server_info = mysqli_get_server_info($database->DbHandle);
    $host_info = mysqli_get_host_info($database->DbHandle);
    $proto_info = mysqli_get_proto_info($database->DbHandle);
    $client_info = mysqli_get_client_info($database->DbHandle);
    $client_encoding = mysqli_character_set_name($database->DbHandle);
    $status = explode('  ', mysqli_stat($database->DbHandle));
} else {
    $title = "MySQL Info";
    $server_info = mysql_get_server_info();
    $host_info = mysql_get_host_info();
    $proto_info = mysql_get_proto_info();
    $client_info = mysql_get_client_info();
    $client_encoding = mysql_client_encoding();
    $status = explode('  ', mysql_stat());
}
$strictMode = $database->get_one('SELECT @@sql_mode');
$strict_info = (strpos($strictMode, 'STRICT_TRANS_TABLES') !== false or strpos($strictMode, 'STRICT_ALL_TABLES') !== false) ? "MySQL strict mode active" : "MySQL strict mode not active\n";
?>
<table cellpadding="3" border="0">
	<tbody>
	<tr class="h">
		<td><h1 class="p"><?php 
echo $title;
?>
</h1></td>
	</tr>
开发者ID:WebsiteBaker-modules,项目名称:sysinfo,代码行数:31,代码来源:mysqlinfo.php

示例15: statisticsForm


//.........这里部分代码省略.........
    if ($type = 'server_info') {
        $s_infos = $_SERVER;
        $e_infos = $_ENV;
        echo "<div class='submenu'>\r\n\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t<li><a href='#serv_info'>Server</a></li>\r\n\t\t\t\t\t\t<li><a href='#en_info'>Environment</a></li>\r\n\t\t\t\t\t\t<li><a href='#mysql_info'>MySQL</a></li>\r\n\t\t\t\t\t\t<li><a href='#pdf_con'>PDF-converter</a></li>\r\n\t\t\t\t\t\t<li><a href='#php_ini'>php.ini file</a></li>\r\n\t\t\t\t\t\t<li><a href='" . WEBROOT_DIR . "/admin/?f=35'>PHP integration</a></li>\r\n\t\t\t\t\t\t<li><a href='#php_sec'>PHP security info</a></li>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t\t<table width='98%'>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='headline' colspan='6'>\r\n\t\t\t\t\t\t\t<div class='headline cntr'><a name='serv_info'>Server</a></span> </div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td width='20%' class='tblhead'>Key</td>\r\n\t\t\t\t\t\t<td class='tblhead'>Value</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
        $bgcolor = 'odrow';
        $i = 0;
        reset($s_info);
        while (list($key, $value) = each($s_infos)) {
            echo "<tr class='{$bgcolor} cntr'>\r\n\t\t\t\t\t\t<td>{$key}</td>\r\n\t\t\t\t\t\t<td class='bordl'>{$value}</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
            $i++;
            if ($bgcolor == 'odrow') {
                $bgcolor = 'evrow';
            } else {
                $bgcolor = 'odrow';
            }
        }
        echo "\r\n\t\t\t\t</table><br />\r\n\t\t\t\t<a class='navup' href='#head' title='Jump to Page Top'>Top</a>\r\n\t\t\t\t<br /><br />\r\n\t\t\t\t<table width='98%'>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class='headline' colspan='6'>\r\n\t\t\t\t\t\t\t<div class='headline cntr'><a name='en_info'>Environment</a></span> </div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td width='20%' class='tblhead'>Key</td>\r\n\t\t\t\t\t\t<td class='tblhead'>Value</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t";
        $bgcolor = 'odrow';
        $i = 0;
        reset($e_info);
        while (list($key, $value) = each($e_infos)) {
            echo "<tr class='{$bgcolor} cntr'>               \r\n                        <td>{$key}</td>\r\n                        <td  class='bordl'>{$value}</td>\r\n                    </tr>\r\n                ";
            $i++;
            if ($bgcolor == 'odrow') {
                $bgcolor = 'evrow';
            } else {
                $bgcolor = 'odrow';
            }
        }
        echo "\r\n                </table><br />\r\n                <a class='navup' href='#head' title='Jump to Page Top'>Top</a>\r\n            ";
        $server_version = mysql_get_server_info();
        $host_info = mysql_get_host_info();
        $client_info = mysql_get_client_info();
        $protocol_version = mysql_get_proto_info();
        echo "<br /><br />\r\n            \t<table width='98%'>\r\n            \t<tr>\r\n            \t\t<td class='headline' colspan='6'>\r\n            \t\t<div class='headline cntr'><a name='mysql_info'>MySQL Info</a></span> </div>\r\n            \t\t</td>\r\n            \t</tr>\r\n               \t<tr>\r\n                \t<td width='35%' class='tblhead'>Key</td>\r\n                \t<td  class='tblhead'>Value</td>\r\n                </tr>\r\n            ";
        $bgcolor = 'odrow';
        echo "\r\n                <tr class='{$bgcolor} cntr'>\r\n                    <td>MySQL Server version</td>\r\n                    <td  class='bordl'>{$server_version}</td>\r\n                </tr>\r\n            ";
        $bgcolor = 'evrow';
        echo "\r\n                <tr class='{$bgcolor} cntr'>\r\n                    <td>Connection info</td>\r\n                    <td  class='bordl'>{$host_info}</td>\r\n                </tr>\r\n            ";
        $bgcolor = 'odrow';
        echo "\r\n                <tr class='{$bgcolor} cntr'>\r\n                    <td>Client library info</td>\r\n                    <td  class='bordl'>{$client_info}</td>\r\n                </tr>\r\n            ";
        $bgcolor = 'evrow';
        echo "\r\n                <tr class='{$bgcolor} cntr'>\r\n                    <td>MySQL protocol version</td>\r\n                    <td  class='bordl'>{$protocol_version}</td>\r\n                </tr>\r\n            ";
        $bgcolor = 'odrow';
        echo "\r\n                <tr class='{$bgcolor} cntr'>\r\n                    <td>Support for mysqli</td>\r\n                    <td  class='bordl'>See below as part of your PHP installation</td>\r\n                </tr>\r\n                </table><br />                \r\n                <a class='navup' href='#head' title='Jump to Page Top'>Top</a>\r\n            ";
        $os = '';
        $os = $_ENV['OS'];
        // not all shared hosting server will supply this info
        $admin_path = $_ENV['ORIG_PATH_TRANSLATED'];
        // that might work for shared hosting server
        $admin_file = $_SERVER['SCRIPT_FILENAME'];
        // should present the physical path
        $sdoc_root = $_SERVER['DOCUMENT_ROOT'];
        // this should provide every hoster (???)
        $edoc_root = $_ENV['DOCUMENT_ROOT'];
        // this should provide every hoster (???)
        echo "<br /><br />\r\n        \t<table width='98%'>\r\n        \t<tr>\r\n        \t\t<td class='headline' colspan='6'>\r\n        \t\t<div class='headline cntr'><a name='pdf_con'>PDF-converter relevant Info</a></span> </div>\r\n        \t\t</td>\r\n        \t</tr>\r\n           \t<tr>\r\n            \t<td width='35%' class='tblhead'>Key</td>\r\n            \t<td  class='tblhead'>Value</td>\r\n            </tr>\r\n            ";
        $bgcolor = 'odrow';
        if ($os) {
            echo "\r\n                    <tr class='{$bgcolor} cntr'>\r\n                        <td>Operating System</td>\r\n                        <td  class='bordl'>{$os}</td>\r\n                    </tr>\r\n                ";
            $bgcolor = 'evrow';
        }
        if (!$os) {
            $s_soft = $_SERVER['SERVER_SOFTWARE'];
            $sys_os = stripos($s_soft, "lin");
            if (!$sys_os) {
开发者ID:pwh,项目名称:scrutiny,代码行数:67,代码来源:index.php


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