473,385 Members | 1,844 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,385 software developers and data experts.

Displaying result while still processing.....

Hi all,

Strange topic, I'll explain it:

I have a page with a for-loop that takes a long time to execute.
In this loop, a line of data is printed using printf (or echo).

I currently see the printed data only after completion of the for-loop.
What I'd like to have is that each bit of data that is printed in the loop,
displays at once, so that I can see the progress of the loop...

Is there a way to achieve this?

TIA for your help!

--
Clouds®


Jul 17 '05 #1
4 1517
Clouds® wrote:
Hi all,

Strange topic, I'll explain it:

I have a page with a for-loop that takes a long time to execute.
In this loop, a line of data is printed using printf (or echo).

I currently see the printed data only after completion of the for-loop.
What I'd like to have is that each bit of data that is printed in the loop,
displays at once, so that I can see the progress of the loop...

Is there a way to achieve this?


while () {
echo "fkjfijij\n";
flush();
}
Jul 17 '05 #2

"Kevin Thorpe" <ke***@pricetrak.com> schreef in bericht
news:41***********************@news.easynet.co.uk. ..
Clouds® wrote:
Hi all,

Strange topic, I'll explain it:

I have a page with a for-loop that takes a long time to execute.
In this loop, a line of data is printed using printf (or echo).

I currently see the printed data only after completion of the for-loop.
What I'd like to have is that each bit of data that is printed in the loop, displays at once, so that I can see the progress of the loop...

Is there a way to achieve this?


while () {
echo "fkjfijij\n";
flush();
}


Thnxz...
For some reason (IE 6.0? XP Pro? webserver?) this still doesn't do the
trick...
Any other options?

--
Clouds®

Jul 17 '05 #3
Clouds® wrote:

"Kevin Thorpe" <ke***@pricetrak.com> schreef in bericht
news:41***********************@news.easynet.co.uk. ..
Clouds® wrote:
> Hi all,
>
> Strange topic, I'll explain it:
>
> I have a page with a for-loop that takes a long time to execute.
> In this loop, a line of data is printed using printf (or echo).
>
> I currently see the printed data only after completion of the for-loop.
> What I'd like to have is that each bit of data that is printed in the loop, > displays at once, so that I can see the progress of the loop...
>
> Is there a way to achieve this?


while () {
echo "fkjfijij\n";
flush();
}


Thnxz...
For some reason (IE 6.0? XP Pro? webserver?) this still doesn't do the
trick...
Any other options?


See if this helps:

...
flush();
ob_flush();

I sometimes find one on its own doesn't work but when you use both of them
it usually does. Also make sure any output you have has line breaks before
doing the flush as this sometimes seems to make a difference.

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Jul 17 '05 #4
*** Clouds® wrote/escribió (Tue, 17 Aug 2004 14:13:36 +0200):
For some reason (IE 6.0? XP Pro? webserver?) this still doesn't do the
trick...
Any other options?


Apart from what you've already been told, check source code in your
browser. Sometimes they won't display a page until it's fully loaded (esp.
in there're tables involved).
--
-- Álvaro G. Vicario - Burgos, Spain
-- Questions sent to my mailbox will be billed ;-)
--
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Francisco | last post by:
I have this question: I have a simple search to a db, something like: "select description from games where year = '1990'" suppose I get 300 results, I would like to display this in pages of 30...
8
by: paul | last post by:
Hi everyone, I've just started using php, and although I am very impressed by it, there are some things with which I am confounded! What I'm trying to do is read in a Date from a mySql database...
0
by: Bernd Fuhrmann | last post by:
Hi! I have two (or more) templates for one certain tag: The first one: tobeimported.xsl: <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0"
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
0
by: Phil G. | last post by:
Hi, my 'project' requires that I create a form with text info. at set time periods. These time periods are not evenly spaced so I pass a param for the delay(seconds). In order to debug this I have...
13
by: comp.lang.php | last post by:
I have currently devised a way to display up to 3,000 records via PHP/HTML by using pagination techniques that stuff an entire DB query resultset into a $_SESSION object to use within pagination. ...
2
by: Gordon | last post by:
I am looking for a way to display a waiting page whilst some processing is happening. Depending on the result of that processing I may go back to the original page ( and maintian view state) or go...
13
by: David W. Fenton | last post by:
I've been struggling the last two days with something I thought was very easy, which is to open a web page with a form on it and populate the form with data passed in a query string (either POST or...
1
by: ajos | last post by:
This may be very dumb question, but still...I am displaying a value in a input tag with the value shown as readonly... <input type=text size=18 maxlength=50 name="company" value=<%=companyCode %>...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.