# workerman-thinkphp **Repository Path**: ligs11/workerman-thinkphp ## Basic Information - **Project Name**: workerman-thinkphp - **Description**: workerman 接单大厅 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2022-07-26 - **Last Updated**: 2024-07-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ThinkPHP 6.0 + Workerman =============== 1.安装扩展包 ~~~ composer install ~~~ 2.更改数据库链接 ~~~ 2.1 更改.env数据库链接 2.2 更改 app/worker/Events 数据库配置 $db = new \Workerman\MySQL\Connection('127.0.0.1','3306', 'feichu', 123456, 'feichu'); ~~~ 3.执行数据库迁移命令 ~~~ php think migrate:run ~~~ 4.执行数据填充 ~~~ php think seed:run ~~~ 5.Linux 运行workerman ~~~ 启动 php start.php start 常驻启动 php start.php start -d 重启 php start.php restart 停止 php start.php stop //宝塔websocket使用公网ip 示例: ws://123.57.122.166:2348 ~~~ 6.windows 运行workerman ~~~ php app\worker\start_register.php app\worker\start_gateway.php app\worker\start_businessworker.php //本地websocket使用局域网ip cmd ipconfig 查看 IPv4 地址 示例: ws://192.168.0.103:2348 ~~~ 7.websocket测试地址 http://coolaf.com/tool/chattest