A Way to Flush to a browser and continue with the query
Posted: Tue Jun 05, 2007 1:42 pm
I have a processing image for a large query and now that I know a little more theory behind PHP, I am ready to ask for help regarding the question.
The file that does all the processing and query calling is from an include. Currently I am trying along these lines from things I have read:
index.php
content.php
What I need is a way to ensure that this image is displayed before the query in a huge table is displayed and then plan on using Javascript to hide the image from the user.
Is there something I am doing wrong that this won't output properly? I can see most of the header is output to the browser, but never can get the processing image displayed. The lucky thing is I am only required to have this working for IE6/7 and FF2 so buffer output from the browser is less of an issue as long as the processing image is displayed.
The file that does all the processing and query calling is from an include. Currently I am trying along these lines from things I have read:
index.php
Code: Select all
include "header.php"
include "content.php"
include "footer.phpCode: Select all
ob_start();
//output processing image
echo str_pad('',4096)."\n";
ob_flush();
flush();
ob_end_flush();
//call to the query on a remote machineIs there something I am doing wrong that this won't output properly? I can see most of the header is output to the browser, but never can get the processing image displayed. The lucky thing is I am only required to have this working for IE6/7 and FF2 so buffer output from the browser is less of an issue as long as the processing image is displayed.