Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- how to buffer output
March 3, 2005, 11:17 am
rate this thread
vishal here. can anyone tell me that how to buffer output and then send
the output to client at a time.
what is my problem is that i have a php file which runs query on
database and takes some time to get query result. so what i want is i
want to buffer output till the query returns result and then send the
buffered output to client at a time.
thxs for help in advance.
Re: how to buffer output
On Thu, 03 Mar 2005 05:17:49 -0800, vishal wrote:
use output buffering:
on the first lin of your script ( the one that does db query) put :
// do your db query
// and setup resulting html
// the normal way (usning echo, print etc..)
// then just call:
ob_end_flush(); // this outputs output buffer and turns off output
- » how can i store global variables for whole web site
- — Previous thread in » PHP Scripting Forum