PHP connection_status() Function
Complete PHP Misc Reference
Definition and Usage
The connection_status() function returns the current connection status.
Possible
values that can be returned are:
- 0 - CONNECTION_NORMAL - connection is running normally
- 1 - CONNECTION_ABORTED - connection is aborted by user or network error
- 2 - CONNECTION_TIMEOUT - connection timed out
- 3 - CONNECTION_ABORTED & CONNECTION_TIMEOUT
Syntax
Example
<?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;
?>
|
Complete PHP Misc Reference
Stylus Studio® 2010 XML Enterprise Suite raises the bar for productivity in XML development tools.
Millions of XML developers and data integration specialists turn to Stylus Studio's comprehensive and intuitive
XML toolset to tackle today's advanced XML data transformation and aggregation challenges.
|
- XML Pipeline Editor, Debugger and Code Generator
- DataDirect XML Converters
- XQuery Mapper, Editor, Debugger, and Profiler
- XSLT Mapper, Editor, Debugger, Designer, and Profiler
- Java and C# for .Net Code Generation
- XML Schema Designer With Documentation Generator
- XML Editor With Full XPath Integration
Download a free trial now
|
|