Script Stops
Posted: Thu Apr 01, 2010 5:11 am
This script runs as expected on my local machine:
It outputs the elapsed time in seconds every 6 seconds like this:
[text]6
12
18
24
30
36
42[/text]
But when I run it on my shared host the output looks like this:
[text]6[/text]
It just prints the number 6. Anyone have an idea why this happens?
Code: Select all
<?php
$starttime = time();
$firsttime = $starttime;
$count = 0;
while($count < 7)
{
if (time()-$starttime > 5){
$starttime = time();
echo $starttime-$firsttime."<br />";
$count++;
}
}
?>[text]6
12
18
24
30
36
42[/text]
But when I run it on my shared host the output looks like this:
[text]6[/text]
It just prints the number 6. Anyone have an idea why this happens?