=== connection_status() === 测试失败,谁用过,帮我搞搞
<?
set_time_limit(0);
echo str_repeat("a ",300);
ignore_user_abort(false); //this way, the user can stop the output, but not the script.
$i = 0;
while (true) {
echo "test<br>\n";
flush();
sleep(1);
if (connection_status()!=0){
add2file("over");
die(); //kills the script
}
add2file('b');
}
//add2file('b');
function add2file($t){
$fp = fopen("c:/c.txt", 'a+');
fwrite($fp, $t);
fflush($fp);
fclose($fp);
}
?>
无论我把ignore_user_abort(false);设置成true还是false,都不起作用,后台一直运行,根本不像手册中说的那样,我觉得这个函数将来会有用就测试了一下,结果失败!
help!!!!!!!!!!!