|
Posted by Erwin Moller on 09/26/29 11:59
Oli Filth wrote:
> Erwin Moller said the following on 29/09/2006 10:55:
>> duzhidian@gmail.com wrote:
>>
>>> I am using Linux, php and mysql.
>>>
>>> When I run my script, it will take a very long time. So when users
>>> close their browsers, my scripts stop either. What I want to do is let
>>> the script continue running and send an email at the end.
>>>
>>> How can I successfully do that?
>>>
>>
>> Are you sure your script stops running when the client closes the
>> browser? That surprises me, because AFAIK the server is working on a
>> request and has no open line to the state of the visitors browser.
>>
>> I expect that your script finishes just fine, both when the browser
>> windows is closed or leaved open.
>>
>> So, are you sure this is happening?
>
> If the browser is closed whilst the script is still processing, then the
> server *will* know about this, because the TCP connection will be
> terminated.
>
> See http://php.net/manual/features.connection-handling.php.
>
Oki, That's clear.
Your link also contains the answer the OP was looking for. :-)
ignore_user_abort()
Thanks Oli.
Regards,
Erwin
[Back to original message]
|