App下载

demo_func_misc_connection_status 在线工具

demo_func_misc_connection_status 在线工具

<?php
switch (connection_status())
{
case CONNECTION_NORMAL:
&nbsp;&nbsp;  $txt = 'Connection is in a normal state';
&nbsp;&nbsp;  break;
case CONNECTION_ABORTED:
&nbsp;&nbsp;  $txt = 'Connection aborted';
&nbsp;&nbsp;  break;
case CONNECTION_TIMEOUT:
&nbsp;&nbsp;  $txt = 'Connection timed out';
&nbsp;&nbsp;  break;
case (CONNECTION_ABORTED & CONNECTION_TIMEOUT):
&nbsp;&nbsp;  $txt = 'Connection aborted and timed out';
&nbsp;&nbsp;  break;
default:
&nbsp;&nbsp;  $txt = 'Unknown';
&nbsp;&nbsp;  break;
}

echo $txt;
?>
运行结果