PHP + Swoole 简单聊天室
- PHP
- 2021-09-23
- 6840
- 14
Chatroom
PHP + Swoole 开发的简单聊天室demo, 主要是 websockt 的应用 。
环境要求
- PHP >= 7.0
- Swoole
- composer
项目地址
https://github.com/kesixin/Chatroom
安装
git clone https://github.com/kesixin/Chatroom
composer install
启动 websockt
cd ./webim
php webim_server.php
启动 PHP 内置服务器
cd ./public
php -S localhost:8000
浏览器访问 localhost:8000 即可进入聊天
截图
项目测试地址
http://test.kesixin.xin/ ,由于没开启端口,可能无法运行,需要请联系!
匿
匿名
1
4年前 ·
测
测试
测试
5年前 · 广东 广州
阿
阿强
你好,我安装完之后,启动websocket的时候报 /Users/zhouqiang/file/github/ChatroomPHP Fatal error: Uncaught Error: Class 'swoole_table' not found in /Users/zhouqiang/file/github/Chatroom/src/WebSocket.php:117 Stack trace: #0 /Users/zhouqiang/file/github/Chatroom/src/WebSocket.php(17): WebIM\WebSocket->createTable() #1 /Users/zhouqiang/file/github/Chatroom/webim_server.php(5): WebIM\WebSocket->__construct() #2 {main} thrown in /Users/zhouqiang/file/github/Chatroom/src/WebSocket.php on line 117 错误,找了半天没找到,初学者
6年前 · 北京 北京
c
cicada chirp
厉害
6年前 · 河北 石家庄
S
Sean
好厉害!
6年前 · 北京 北京
s
squid
不错哦,刚想学学
6年前 · 浙江 杭州
愚
愚公
值得一赞
6年前 · 广东 广州
K
Korean
可以看一下吗?
6年前 · 广东 广州
Mamba 博主
回复 Korean:可以啊
6年前 · 广东 广州
Mamba 博主
回复 Korean:可以了
6年前 · 广东 广州
1
1
回复 Mamba:31
5年前 · 上海 上海
1
1
回复 1:31
5年前 · 上海 上海