PHP mysqli get_connection_stats() 函式
示例
返回客戶端連線的統計資訊
<?php
$con = mysqli_connect("localhost","my_user","my_password","my_db");
print_r(mysqli_get_connection_stats($con));
?>
定義和用法
mysqli_get_connection_stats() 函式返回客戶端連線的統計資訊。
語法
面向物件風格
$mysqli -> get_connection_stats()
過程式風格
mysqli_get_connection_stats(connection)
引數值
引數 | 描述 |
---|---|
connection | 必需。指定要使用的 MySQL 連線 |
技術詳情
返回值 | 成功時返回包含連線統計資訊的陣列。失敗時返回 FALSE |
---|---|
PHP 版本 | 5.3+ |
❮ PHP MySQLi 參考