RE: [PHP] intermediate search screen
| From: | Chris Shiflett | Date: | Thu, 10 Apr 2003 01:58:25 +0000 |
| Subject: | RE: [PHP] intermediate search screen | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143249@lists.php.net to get a copy of this message | ||
--- "John W. Holmes" <holmes072000@charter.net> wrote:
> No... You can't show some text on a page and then execute some PHP
> code to do your search... Remember how PHP works. By the time the
> browser loads, the PHP code is done.
While this is true, PHP does support chunked transfer encoding. I use this with
Apache when I want to send output to the user prior to the completion of the
page. This is also how most chat rooms work.
Basically, the content length is communicated for each chunk within the content
itself, so the Content-Length header is not necessary, nor is it necessary to
generate the entire output prior to sending it to the client.
Look into the flush() function for more information (and some user notes about
how to work around IE deficiencies):
http://www.php.net/flush
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/