Кто знает как заставить nginx начать сразу отдавать ответ клиенту не дожидаясь завершения PHP скрипта?
Это надо для реализации comet на транспорте бесконечного iframe.
Вот такой код в apache работает.
[code]
<html>
<body>
<?php
set_time_limit(0);
while (@ob_end_flush()) {}
ob_implicit_flush(1);
$i=1;
while(true) {
echo "<script>parent.handleDigit($i)</script>";
sleep(1);
$i++;
}
?>
</body>
</html>
[/code]
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 292
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready