问题描述
在共享托管中,websockets是否有其他选择?我了解node.js,socket.io,Express.js,但无法在共享托管中使用它们.因此,如果有其他替代方法可用于创建实时网站,请告诉我.
Is there any alternative for the websockets to use in shared hosting? I know about node.js, socket.io, Express.js but Can't use them in shared hosting. So, if there is any alternative used for making a realtime website then tell me.
推荐答案
如果共享主机提供PHP支持,则可以使用PHP中的一个WebSockets库:
If your shared hosting provides PHP support, you can use one of the WebSockets libraries in PHP:
要安装Ratchet,请阅读如何在共享主机上安装Composer的答案.
For installing Ratchet, read my answer on how to install Composer on a shared hosting.
或者,您可以使用我的项目 Node.php .
Alternatively, you can install Node.js on a shared hosting using my project Node.php.
这篇关于除了在共享托管中使用websockets之外,还有其他选择吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!