Re: note 97852 modified in function.register-shutdown-function by visualmind
| From: | Daniel Brown | Date: | Wed, 12 May 2010 13:39:28 +0000 |
| Subject: | Re: note 97852 modified in function.register-shutdown-function by visualmind | ||
| References: | 1 2 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169179@lists.php.net to get a copy of this message | ||
Why did you remove the opening and closing tags in the code
provided? I've been spending the last three years doing the opposite
so that all code will highlight properly. Also, we don't bother to
fix the content of the note (like the capitalized 'S' at the beginning
of the sentence), and try to leave the user's actual note intact as
much as possible.
On Wed, May 12, 2010 at 07:35, <visualmind@php.net> wrote:
> Simple method to disconnect the client and continue processing:
>
> function endOutput($endMessage){
> ignore_user_abort(true);
> set_time_limit(0);
> header("Connection: close");
> header("Content-Length: ".strlen($endMessage));
> echo $endMessage;
> echo str_repeat("\r\n", 10); // just to be sure
> flush();
> }
>
> // Must be called before any output
> endOutput("thank you for visiting, have a nice day');
>
> sleep(100);
> mail("you@yourmail.com", "ping", "i'm here");
>
>
> --was--
> simple method to disconnect the client and continue processing:
>
> <?php
> function endOutput($endMessage){
> ignore_user_abort(true);
> set_time_limit(0);
> header("Connection: close");
> header("Content-Length: ".strlen($endMessage));
> echo $endMessage;
> echo str_repeat("\r\n", 10); // just to be sure
> flush();
> }
>
> // Must be called before any output
> endOutput("thank you for visiting, have a nice day');
>
> sleep(100);
> mail("you@yourmail.com", "ping", "i'm here");
> ?>
>
>
> http://php.net/manual/en/function.register-shutdown-function.php
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
</Daniel P. Brown>
daniel.brown@parasane.net || danbrown@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!