PHP connection_aborted () Función
PHP Manual de Referencia Miscelánea
Ejemplos
Crear una función (check_abort ()), escribe un mensaje de registro cuando el cliente termina la secuencia de comandos:
<?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");
?>
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");
?>
Definición y Uso
connection_aborted cheques () de función de si el cliente está desconectado.
gramática
connection_aborted()
detalles técnicos
Devuelve: | Si la conexión se termina devuelve 1, de lo contrario, devuelve 0. |
---|---|
versión de PHP: | 4+ |
PHP Manual de Referencia Miscelánea