当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > connection_status() 函数
The connection_status() function returns the current connection status.
connection_status()函数的作用是:返回当前的连接状态。
Possible values that can be returned are:
该参数返回的值如下:
connection_status() |
<?php switch (connection_status ())
{
case CONNECTION_NORMAL: $txt = 'Connection is in a normal state'; break;
case CONNECTION_ABORTED: $txt = 'Connection aborted'; break;
case CONNECTION_TIMEOUT: $txt = 'Connection timed out'; break;
case (CONNECTION_ABORTED & CONNECTION_TIMEOUT): $txt = 'Connection aborted and timed out'; break;
default: $txt = 'Unknown'; break;
} echo $txt ?> |
评论 (0) All