3 Star 1 Fork 0

Admin / water_push_system

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mega 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
lcxlcx 提交于 2020-07-21 15:21 . lcx
#!/usr/bin/env php
<?php
/**
* Created by PhpStorm.
* User: rain1
* Date: 2016/5/10
* Time: 18:00
*/
// 定义根目录
define('ROOT_PATH', dirname(__FILE__));
require ROOT_PATH . '/autoload.php';
if (!isset($argv[1])|| !isset($argv[2])) {
echo "please input cmd and server name: start all,start testserv " . PHP_EOL;
exit;
}
$cmd = $argv[2];
$name = $argv[1];
$configPath = ROOT_PATH . '/config/' . $name . '.ini';//获取配置地址
if (!file_exists($configPath)) {
throw new \Exception("[error] profiles [$configPath] can not be loaded");
}
\Swoole\Util\Config::loadConfig($configPath);
if (empty($class = \Swoole\Util\Config::get('server.class'))) {
throw new \Exception("[error] server class not set");
}
if (empty($protocol = \Swoole\Util\Config::get('server.protocol'))) {
throw new \Exception("[error] protocol not set");
}
/** @var \Swoole\Service\Implement\Server $server */
$server = new $class();
$server->loadConfig(\Swoole\Util\Config::getConfig());
$server->setProtocol(new $protocol());
$server->run($cmd);
1
https://gitee.com/youheone_1668751282/water_push_system.git
git@gitee.com:youheone_1668751282/water_push_system.git
youheone_1668751282
water_push_system
water_push_system
master

搜索帮助