Output buffering is doing nothing for you in the given example. It does not reduce client side resources... if anything it increases the usage serverside resources. Perhaps you are thinking of gz compression? You might use a combination of ob* functions and gz* functions to minimize bandwidth requirments.. but there's no guarantee that your user's browsers supports it.
http://www.php.net/manual/en/printwn/function.gzcompress.php -Kevin ----- Original Message ----- From: "Jay Blanchard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 25, 2002 10:45 AM Subject: [PHP] Output Buffering - Am I using it correctly? > Howdy group! > > I am outputting a rather large data set to an Excel spreadsheet from a MySQL > database on a healthy FreeBSD server. The Apache server is on the same > server as the database. The code looks like this.... > > <? > /* > ** SWB CABS Project > ** USOC Charges Detail > ** Report By Criteria - Spreadsheet > */ > > // open output buffer > ob_start(); > > // excel headers > header("Content-Type: application/vnd.ms-excel"); > header("Content-Disposition: inline; filename=\"excel.xls\""); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); > > .... > /* > ** lots of code that gets roughly > ** 15,000 - 20,000 rows of data > ** each row is 209 bytes of data > */ > .... > > // close output buffer > ob_end_flush(); > ?> > > Now, even though I have set ob_start() the headers get sent (as it says in > the docs; "While output buffering is active no output is sent from the > script (other than headers), instead the output is stored in an internal > buffer. ") > > The Task Manager shows that the processes on my local machine for EXCEL.EXE > go to the maximum available CPU cycles and stays there until the spreadsheet > is either delivered or the system times out. I thought that using output > buffering would lower use of client system resources. Is this not true? > > Thanks! > > Jay > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php