Reply to Re: How can i send 'eof' to the client?

Your name:

Reply:


Posted by Chung Leong on 11/01/18 11:49

S. C. Jeong wrote:
> I want to send 'eof' kind of message after some processes. Die or exit
> cannot be used because there are some more processes to complete, but
> nothing major to users.
>
> <?php
> phpinfo ();
> //i want to finish the process here!!
> //flush () //? doesnt work?
> sleep (10); // mimic of (not)complicated process
> ?
>
> Help me to solve this problem :)
>
> Calvin J

Try turning on output buffering and setting the Content-Length header
before sending the contents.

<?

ob_start();
/* ... do stuff ... */
$s = ob_get_clean();
$len = strlen($s);
header("Content-Length: $len");
echo $s;

?>

Might want to set the Connection header to 'closed' as well.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация