Re: flush() issue
| From: | Andrew Brampton | Date: | Wed, 20 Nov 2002 13:30:44 +0000 |
| Subject: | Re: flush() issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125238@lists.php.net to get a copy of this message | ||
Are you outputing each row in a table?
IE won't start displaying the table until the </table> tag, that might be
causing your problem...
Andrew
----- Original Message -----
From: "Jock Pereira" <jpereira@dataonesoftware.com>
To: <php-general@lists.php.net>
Sent: Wednesday, November 20, 2002 1:28 PM
Subject: [PHP] flush() issue
Having an issue getting flush to work. Browser version is IE 6 sp1. I am
not using mod_gzip on Apache. In the following code sample you can see that
I am looping through a mysql result array and using a different include each
time. At the end of the foreach loop I am attempting to flush to the
browser. I am taking into consideration the buffer size that must be met for
flush to work (str_pad) and all other considerations I came across in the
php manual... http://www.php.net/manual/en/function.flush.php.
Despite the below my browser does not show results until the entire script
has completed (~10 minutes). Any idea on how I can get this to work?
Anything to take into consideration that I am not... considering... below?
Thanks!
Jock Pereira
_____________ Code_Sample_Below______________________________
$result = mysql_query("SELECT * FROM DEALER_Inventory WHERE DealerID =
'$this_dealer' AND Car_Type != 'new'");
foreach ($themalls as $thismall)
{
logExportResults("$this_dealer", "$thismall", "Exporting...");
Print ("<br><strong><font size=\"2\" face=\"Arial,
Helvetica,
sans-serif\"> $this_dealer: Sending to
$thismall</font></strong><br>");
include('include/EXPORT_'.$thismall.'.php');
mysql_data_seek($result,0);
logIt("7","",$thismall);
logExportResults("$this_dealer", "$thismall", "Export Done...");
echo str_pad(" ", 300);
flush();
}
_______________ End_Code_Sample______________________________