connection_status() 函数返回当前的连接状态。
可返回的可能值:
</>code
- connection_status()
</>code
- <?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;
- ?>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号