By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,457 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

how to buffer output

P: n/a
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.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 2005-03-03, vishal <vi************@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>
Jul 17 '05 #2

P: n/a
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


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.