ignore_user_abort(true);
echo "Testing connection handling";
while (1) {
if (connection_aborted() != 0)
{
$fopen = fopen('aborted.txt', 'a+');
fwrite($fopen, connection_aborted().connection_status());
fclose($fopen);
break;
}
sleep(1);
echo "test";
flush();
}