Home > Backend Development > PHP Problem > How to use php ignore_user_abort function

How to use php ignore_user_abort function

藏色散人
Release: 2023-02-22 19:14:01
Original
3523 people have browsed it

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)
Copy after login

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();
?>
Copy after login

The output of the above code is as follows:

0
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template