Current Location: Home> Function Categories> ignore_user_abort

ignore_user_abort

Set whether the execution of the script is interrupted when the client disconnects
Name:ignore_user_abort
Category:Miscellaneous
Programming Language:php
One-line Description:Sets whether the remote client can abort a running script.

Definition and usage

ignore_user_abort() function sets whether disconnecting from the client will terminate the execution of the script.

This function returns the previous value set by user-abort (a boolean value).

Tip: PHP does not detect whether the user is disconnected until it tries to send a message to the client. Simply using echo statements cannot ensure that information is sent, see the flush() function.

Example

Set to false (default) - Client abortion will cause the script to stop running:

 <?php
ignore_user_abort ( ) ;
?>

Output:

 0

grammar

 ignore_user_abort ( setting )
parameter describe
Setting

Optional. If set to TRUE, user abortion is ignored in the script (the script will continue to run).

The default is FALSE, which means that client abortion will cause the script to stop running.

Similar Functions
Popular Articles