connection_aborted() function for apache.
| From: | Thies C. Arntzen | Date: | Thu, 21 Jan 1999 17:05:14 +0000 |
| Subject: | connection_aborted() function for apache. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3665@lists.php.net to get a copy of this message | ||
hi,
i've implemeted a connection_aborted() function (only for apache module
so far) that you can use in your script to check whether all data has
been delivered to the client or not.
this could be used for logging & stuff:
eg:
<?
function checkok()
{ if (connection_aborted())
logit("data not completly send");
else
logit("everything has been sent");
}
register_shutdown_function("checkok");
....
while (mysql_nextrow())
{ if (connection_aborted())
break;
do some db etc stuff in here - like reading rows from a DB....
}
?>
as this is pretty "low-level" stuff i'm not commiting it now. the
included patch is against latest CVS.
i would also like to have an php3.ini directive to set the default php
behaviour - either continue the script (and let the developer check via
connection_aborted() - or do an ABNORMAL_SHUTDOWN)
any opinions???
regards,
tc