MySQLi - Client Info

语法

string mysqli_get_client_info ( mysqli $link )

定义和用法

用于获取 MySQL 客户端信息

示例

试试下面的例子 −

<?php
   $servername = "localhost:3306";
   $username = "root";
   $password = "";
   $dbname = "TUTORIALS";
   $conn = new mysqli($servername, $username, $password, $dbname);
   
   if ($conn->connect_error) {
      die("Connection failed: " . $conn->connect_error);
   } 
   echo "Database connected";
   printf("Client version: %s
", mysqli_get_client_info());
   
   mysqli_close($conn);
?>

上述代码的示例输出应该是这样的 -

Database connected Client version: 
   mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $

mysqli_useful_functions.html