September 2001
Intermediate to advanced
768 pages
32h 45m
English
int connection_aborted(void)
Checks whether the remote client has disconnected.
Returns:
1 if the connection has been aborted; 0 for all other cases
Description:
connection_aborted() checks whether the remote client has disconnected, either because of a network error or via the browser’s stop functionality. This function can be used in conjunction with the register_shutdown_function() and ignore_user_abort() functions to allow developers to handle cases in which the client aborts the script before it completes running.
See also:
To deal with a terminated connection:
register_shutdown_function()
To ignore user aborts:
ignore_user_abort()
Version:
3.0.7+, 4.0b4+
Example:
Read now
Unlock full access