I am now developing an app based on Tonido php development platform. I am using TonidoPlug2 for testing. The app is going to provide a long connection to the client. I used the flush() function to flush out the output to the client. But it is not working. Below is the code.
Code: Select all
<?php
header("Content-Type: text/plain");
set_time_limit(0);
$infoString = "Hello World" . "\n";
while( isset($infoString) )
{
echo $infoString;
ob_flush();
flush();
sleep(5);
}
?>
Can anyone help me figure out what the problem is?
Thanks!!