Home > Article > Backend Development > How to use php ignore_user_abort function
php ignore_user_abort function is used to set whether disconnection from the remote client will terminate the execution of the script. Its syntax is ignore_user_abort(setting). The parameter setting is optional. If it is set to TRUE, the disconnection from the user will be ignored (the script will continue running).
#php How to use the ignore_user_abort function?
Definition and usage
ignore_user_abort() function sets whether disconnecting from the remote client will terminate the execution of the script.
Tip: You can call this function without parameters to return the current settings.
Syntax
ignore_user_abort(setting)
Parameters
setting Optional. If set to TRUE, disconnection from the user is ignored (the script will continue running). Set to FALSE by default, disconnecting from the client causes the script to stop running.
Return value: Returns the previous value set by user-abort (a Boolean value).
PHP Version: 4
Instance
Set to false (default) - disconnecting from the client terminates script execution:
<?php ignore_user_abort(); ?>
The output of the above code is as follows:
0
The above is the detailed content of How to use php ignore_user_abort function. For more information, please follow other related articles on the PHP Chinese website!