PHP mysqli_get_connection_stats() 函数

PHP 教程 · 2019-01-28 06:29:00

实例

返回有关客户端连接的统计:

<?php
$con=mysqli_connect("localhost","my_user","my_password","my_db");
// 检测连接
if (mysqli_connect_errno($con))
{
    echo "数据库连接失败: " . mysqli_connect_error();
}

print_r(mysqli_get_connection_stats($con));

mysqli_close($con);
?>

定义和用法

mysqli_get_connection_stats() 函数返回有关客户端连接的统计。

语法

mysqli_get_connection_stats(connection);

参数 描述
connection 必需。规定要使用的 MySQL 连接。

技术细节

返回值: 如果成功则返回一个带有连接统计的数组,如果失败则返回 FALSE。
PHP 版本: 5.3+

点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Algorithms Sequential & Parallel

Algorithms Sequential & Parallel

Russ Miller、Laurence Boxer / Charles River Media / 2005-08-03 / USD 59.95

With multi-core processors replacing traditional processors and the movement to multiprocessor workstations and servers, parallel computing has moved from a specialty area to the core of computer scie......一起来看看 《Algorithms Sequential & Parallel》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具