Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php chrome中的分块传输_Php_Google Chrome - Fatal编程技术网

Php chrome中的分块传输

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

嗨,伙计们,我的代码有问题吗?这是不工作的铬。在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) {
    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();
}