Php chrome中的分块传输
据 嗨,伙计们,我的代码有问题吗?这是不工作的铬。在curl&safari中工作得很好。这很有效Php chrome中的分块传输,php,google-chrome,Php,Google Chrome,据 嗨,伙计们,我的代码有问题吗?这是不工作的铬。在curl&safari中工作得很好。这很有效 set_time_limit(0); header('Content-Encoding: chunked'); header('Transfer-Encoding: chunked'); header('Content-Type: text/plain;charset=utf-8'); header('Connection: keep-alive'); while (true) { ec
set_time_limit(0);
header('Content-Encoding: chunked');
header('Transfer-Encoding: chunked');
header('Content-Type: text/plain;charset=utf-8');
header('Connection: keep-alive');
while (true) {
echo str_pad('', 1024, ' ');// browser/nginx/fastcgi max buffer size
// do some echo
// ob_flush();
flush();
}
你最好看一下这篇文章,尽量让你的意思更清楚一点。
set_time_limit(0);
header('Content-Encoding: chunked');
header('Transfer-Encoding: chunked');
header('Content-Type: text/plain;charset=utf-8');
header('Connection: keep-alive');
while (true) {
echo str_pad('', 1024, ' ');// browser/nginx/fastcgi max buffer size
// do some echo
// ob_flush();
flush();
}