Re: Re: Output While Executing
| From: | Dan Koken | Date: | Tue, 06 Aug 2002 21:20:59 +0000 |
| Subject: | Re: Re: Output While Executing | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111439@lists.php.net to get a copy of this message | ||
Nick,
Hmmmm! I donno??
I just sent this simple test over to my web host and it gave me all 10 messages???? You can run the test at www.dawnridge.com/a.php
I always believed you got output if you had the end "</HTML>" tag. Could be my Web Host is set up differently than yours.
Maybe there is more to this than I understand and someone can jump in here and set me straight.
------------------
<?
for ($i=1;$i < 11; $i++)
{
echo
"<HTML><BODY><P>
** STARTING PASS $i ** </BODY></HTML>"
;
}
?>
---------------------------
Dan...
Nick Oostveen wrote:
Dan, This worked great but I had to use the flush() function mentioned by Matt to get it to output in real-time. Currently the php info function indicates that no value is entered for the output_buffering variable in my php.ini file, so from what I understand it defaults to 0. Even if I explicitly set buffering to 0 with ini_set I am required to use flush for anything to be output to the browser. Is this the normal behavior or does it sound like something is not quite working on my end? At 12:35 PM 8/6/2002 -0700, Dan Koken wrote:Nick, What's wrong with sending the complete HTML for each message. That way it's forced to send. such as: <? echo "<HTML><BODY> Status of Time Consuming task: ** STARTING PASS 1 ** </BODY></HTML>" ; ?> HTH .. Dan Nick Oostveen wrote:I currently have a script which performs various time-consuming tasks and would like to have a status/progress report output to the browser as the script executes. All I'm looking for is a way to echo out simple messages such as "Task 1 starting", "Task 1 complete", "Task 2 starting" and so on. I have seen this behavior implemented in asp, however when using php it seems that the entire script is executed and then only when complete is it sent out to the browser. Is there any way to make php/apache output the html to the browser as it is generated by the script? If not can anyone suggest any other methods of getting the final result that I'm looking for?-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php