2016-05-05 11:41:10 2554次浏览 2条回答 0 悬赏 10 金钱

我使用了echo,$this->stdout 都没有显示到终端上,我这边是一个死循环,需要长期住在内存中

  • 回答于 2016-05-05 12:56 举报

    it works for me:

    class HskcmdController extends \yii\console\Controller
    {
        public function actionWords() {
            $this->stdout("Pre-process for hsk1to6_words:\n", Console::BOLD, Console::FG_BLUE);
    
  • 回答于 2016-05-05 13:03 举报

    how about you try this?

    <?php
        ob_clean();
        while(true){
            echo str_repeat(' ',1024*1024*4);
            echo 'hello, world ...<br />';
            ob_flush();
            flush();
            usleep(1000);
        }
    
您需要登录后才可以回答。登录 | 立即注册
chenghua
经理

chenghua 四川宜宾

注册时间:2014-10-08
最后登录:2018-07-31
在线时长:8小时33分
  • 粉丝3
  • 金钱750
  • 威望20
  • 积分1030

热门问题