PHP connection_aborted() Funksie
Voorbeeld
Skep 'n funksie (check_abort()) wat 'n logboodskap skryf as 'n kliënt die skrip aborteer:
<?php
function check_abort()
{
if (connection_aborted())
error_log ("Script $GLOBALS[SCRIPT_NAME]" .
"$GLOBALS[SERVER_NAME] was aborted by the user.");
}
// Some script to be executed here
// Call the check_abort function when the script ends
register_shutdown_function("check_abort");
?>
Definisie en gebruik
Die funksie connection_aborted() kontroleer of die kliënt ontkoppel het.
Sintaksis
connection_aborted()
Tegniese besonderhede
Terugkeerwaarde: | Wys 1 as die verbinding gestaak is, anders gee dit 0 terug |
---|---|
PHP weergawe: | 4+ |
❮ PHP Misc Reference