Code: Select all
<?
set_time_limit(0);
ignore_user_abort(TRUE);
echo "Start<br>\n";
$i = 1;
while (connection_status() == 0 && connection_aborted() == FALSE)
{
echo "Line $i<br>";
flush();
$i++;
sleep(1);
}
$f = fopen('test.txt' , 'wb');
fwrite($f , 'end');
fclose($f);
exit;
?>But when i press the stop button T__T , or PHP stops immediately or it keeps running forever .
Can someone help me !