This is a discussion on how to buffer output within the PHP Language forums, part of the PHP Programming Forums category; hi vishal here. can anyone tell me that how to buffer output and then send the output to client at ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hi
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. |
|
|||
|
On Thu, 03 Mar 2005 05:17:49 -0800, vishal wrote:
> hi > > 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. use output buffering: on the first lin of your script ( the one that does db query) put : ob_start(); // 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 buffering |
|
|||
|
On 2005-03-03, vishal <vishal_panjabi@yahoo.co.in> wrote:
> hi > > 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. > read the fine manual.... http://www.php.net/ob_start and others..... -- Met vriendelijke groeten, Tim Van Wassenhove <http://www.timvw.info> |