WHAT'S NEW?
Loading...

Ignore User Abort in PHP

Some web scripts can cause problems when there are integration scripts within those scripts. Especially, in those scripts where third party integration is done, we should prevent user to abort the execution of the script when the user starts the execution. The execution is stopped by cancelling the page loading. For such cases, we need the ignore user abort functionality. PHP has a function defined for this: ignore_user_abort().
The prototype of this function is:
int ignore_user_abort([String $value]);
If $value is set, it ignores user abort. If $value is not set, it returns previous setting without changing it.

Example:

<?php
     ignore_user_abort(true);
?>

0 comments:

Post a Comment