Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

ignore_user_abort

Description

The ignore_user_abort of Miscellaneous for PHP set whether a client disconnect should abort script execution.

Syntax

ignore_user_abort ( [ bool $value ] ) : int

Parameters

value

If set, this function will set the ignore_user_abort ini setting to the given value. If not, this function will only return the previous setting without changing it.

Return

Returns the previous setting, as an integer.

Examples

1

<?

// ignore user aborts
ignore_user_abort(true);

// allow script to run forever
set_time_limit(0);

// run loop
while(true)
{
    // break if connection fails
    if(connection_status() != CONNECTION_NORMAL)
    {
        break;
    }

    // sleep 10 seconds
    sleep(10);
}

//the break was triggered so we can perform other tasks without being dependent on the browser...

?>
HomeMenu