yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.23k stars 6.91k forks source link

Do we have any way for realtime shell_exec commands rendering in view? #14570

Closed butteff closed 7 years ago

butteff commented 7 years ago

For example, I want to execute ping or mtr command in terminal and display it on yii2 page. If I do shell_exec() - we can't see output for ping (if we use ping without -c option). If we use ping with -c option - we can see output results only. But I need to have realtime results of execution, like in terminal - I need to see every ping row. Is it possible to do in yii2?

I have no idea how to implement this construction: https://stackoverflow.com/questions/8370628/php-shell-exec-with-realtime-updating in yii2 MVC model. Because this while - plush in controller or model will give a stack problem. I need to do this in view?

How to do it maximum easy, clean and pretty? Thank you.

yii-bot commented 7 years ago

Thank you for your question. In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

This is an automated comment, triggered by adding the label question.