473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to buffer output

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
2 1962
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: gaool | last post by:
Hello, I wrote a python script (python 2.3.3) to send some commands to a programm and to show on the screen the responses of this programm. I use "Pipedream.py" module in my script to speak with...
1
by: Chris Online | last post by:
Hi all, At the moment I'm using a Altera MAX and MAX+plus2 graphical design software. I'm using the following parts inside the altera: Octal flipflop 74HC273 AddressDecoder 74HC154 Octal Buffer...
4
by: ma740988 | last post by:
A few days ago I recieved yet again advice on implementing a buffer of bytes. At issue: (part 1) how do I take the contents of a struct, then dump (used sparingly) it into a byte buffer. ...
5
by: Sandy | last post by:
Hi, In one of my interview i was asked the difference between Stream and Buffer. can anybody explain the difference. Thanks
6
by: BMax | last post by:
Hello I want to create a byte and use it as a buffer, then access it with a binaryreader or streamreader. what is important is to be able to read different variables form that, like readint16,...
5
by: arnuld | last post by:
this is from mentioned section. i did not understand some things here: it means "flushing the buffer" and "writing to output device" are SAME thing, these are just 2 different names for the...
4
by: aki | last post by:
Hi all, i am writing codes for implementing network protocols. i have written a method which is receiving a packet from network. i have assumed that the packet i will receive will be of type...
3
by: scorro1 | last post by:
Hey guys, I am working on a program which is supposed to read input from a file at 100 chars per time, then change the spaces to underscores and reverse the order of the entire document. Now we...
11
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS 2005, ,.net 2 for C# windows application. I'm using Process to run a C application and redirecting its standard output so I can read it with StreamReader.ReadToEnd. It's only...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.