Home  >  Article  >  Backend Development  >  How to use php ignore_user_abort function

How to use php ignore_user_abort function

藏色散人
藏色散人Original
2019-05-26 11:03:113476browse

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).

How to use php ignore_user_abort function

#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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn