note 51131 added to function.connection-status
| From: | Michael at osu1 dot php dot net | Date: | Mon, 21 Mar 2005 05:59:37 +0000 |
| Subject: | note 51131 added to function.connection-status | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86735@lists.php.net to get a copy of this message | ||
Yes it is true. I made some experiments with that functions 'connection_abortes()'. First
a source made an error, which I see. They wrote: ignore_user_abort();
But that only gives you the status of the 'Abort-Setting'.
So I try (with little hope)
'ignore_user_abort(true);'
And as I readout the setting it has changed it...
Next I see that the script runs after I disconnect with the site. But other experiments fail. I try
some things and then it
was logical after an experiment: flush() is one of the necessary things. Without those output to the
client the function
'connection_aborted()' stays on 'false'
The Second is that you have to output something. Without that it also doesn't works.
So I now know that you have to echo something and then output the buffer. Only then 'the
Script' (or the function)
'knows' that the client is disconnected.
----
Manual Page -- http://www.php.net/manual/en/function.connection-status.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51131
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51131&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51131&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51131&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51131&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51131&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51131&report=yes
Search -- http://master.php.net/manage/user-notes.php