1 Star 2 Fork 1

rainbow / tp51

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
server_workerman.php 678 Bytes
一键复制 编辑 原始数据 按行查看 历史
hzboye010 提交于 2018-03-03 17:45 . add gateway-worker
#!/usr/bin/env php
<?php
namespace think;
// 定义应用目录
define('APP_PATH', __DIR__ . '/application/');
define('CONFIG_PATH', __DIR__ . '/config/');
define('POWER','rainbow');
define('__ROOT__', '');
// 加载基础文件
require __DIR__ . '/thinkphp/base.php';
// 执行应用并响应
Container::get('app',[APP_PATH])->bind('push/Worker')->run()->send();
// cmd:
// php server.php
// js :
//ws = new WebSocket("ws://tp51:2346");
// ws.onopen = function() {
// alert("连接成功");
// ws.send('tom');
// alert("给服务端发送一个字符串:tom");
// };
// ws.onmessage = function(e) {
// alert("收到服务端的消息:" + e.data);
// };
PHP
1
https://gitee.com/wujizhou/tp51.git
git@gitee.com:wujizhou/tp51.git
wujizhou
tp51
tp51
master

搜索帮助