PHP connection_aborted() İşlev
Örnek
Bir istemci betiği iptal ederse, bir günlük mesajı yazan bir işlev (check_abort()) oluşturun:
<?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");
?>
Tanım ve Kullanım
Connection_aborted() işlevi, istemcinin bağlantısının kesilip kesilmediğini kontrol eder.
Sözdizimi
connection_aborted()
Teknik detaylar
Geri dönüş değeri: | Bağlantı kesilirse 1, aksi takdirde 0 döndürür |
---|---|
PHP Sürümü: | 4+ |
❮ PHP Çeşitli Referans