如何在没有shell命令的情况下运行websocket


How to run the websocket without shell command

我正在构建一个实时消息系统,并使用了http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket/comment-page-1以教程为例。

在我当地的电脑上,它可以找到。我有一个共享服务器,主机提供商不允许我访问服务器上的shell命令。

有人能帮我吗。有什么方法可以在PHP文件中执行这个shell命令吗?

您可以从PHP启动web套接字,例如:

 exec("php -q ".your_path_of_directory."/server.php >/dev/null 2>&1 &");