ignore_user_abort() function in PHP


The ignore_user_abort() function sets whether a remote client can abort the running of a script.

Syntax

ignore_user_abort(setting)

Parameters

  • setting − True ignores user aborts in a script (the script will continue to run). This is false by default i.e. client aborts will cause the script to stop running

Return

The ignore_user_abort() function returns previous value of the user-abort setting.

Example

The following is an example that sets to false i.e. the default. Client aborts will cause the script to stop running.

<?php
   ignore_user_abort();
?>

Output

The following is the output.

0

Updated on: 30-Dec-2019

333 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements