Home  >  Q&A  >  body text

websocket - phpsocketio中怎么启动?

phpsocketio是基于workerman的
我从github上下载了源码,修改了逻辑能跑起来
启动方式如果是
php server.php restart
php server.php start

这样启动的话 是能接受能转发消息的
但是我如果是用
php server.php start -d
这样反而不行了 客户端刚连接上就断开了

我想问一下 用 start启动和start -d启动区别在哪里

我总不能让php server.php start放在那里吧

漂亮男人漂亮男人2733 days ago907

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-05-16 13:12:10

    Finally the problem was found because Workerman must use its own mysql framework
    If you use other frameworks, the running result will be like a script running from beginning to end, so the database object cannot be persisted

    So you only need to install workerman/mysql

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 13:12:10

    start -d is to start the daemon process

    reply
    0
  • Cancelreply