Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ob_* 等函数使用问题 #18

Closed
hongbaotong opened this issue Mar 22, 2018 · 4 comments
Closed

ob_* 等函数使用问题 #18

hongbaotong opened this issue Mar 22, 2018 · 4 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@hongbaotong
Copy link

我在业务中有使用ob_flush函数用来做持续输出,不过在laravelS无法输出,只输出到了日志文件里

        echo "<script>parent.displayMsg(\"{$msg}\");</script>";
        ob_flush();
        flush();
@hhxsv5
Copy link
Owner

hhxsv5 commented Mar 22, 2018

谢谢反馈!

@hhxsv5 hhxsv5 self-assigned this Mar 22, 2018
@hhxsv5 hhxsv5 added the bug Something isn't working label Mar 22, 2018
@hhxsv5
Copy link
Owner

hhxsv5 commented Mar 22, 2018

经过测试,swoole_http_response无法实现flush输出,只能一次性输出。

不过仍然可以使用ob,执行ob_start()和ob_end_*()配对即可。

 ob_start();
 echo time(), '<br>';
 ob_end_flush();

另外,为何会有持续输出这种需求,应该可以用其他方式来实现,欢迎进技术群QQ群: 698480528 详细交流。

@hhxsv5 hhxsv5 closed this as completed Mar 22, 2018
@hhxsv5 hhxsv5 added the wontfix This will not be worked on label Mar 22, 2018
@hongbaotong
Copy link
Author

确实是可以使用其他方式来实现,不过这个是旧业务,是一个文件扫描持续输出的功能,影响不大

@pensacola1989
Copy link

698480528

chatGPT逐字输出啊,laravel-s 得用php-sse么?我试了一下,不行,单开个swoole server可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants