Download the PHP package dionyang25/yii2-swoole-plugin without Composer
On this page you can find all versions of the php package dionyang25/yii2-swoole-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dionyang25/yii2-swoole-plugin
More information about dionyang25/yii2-swoole-plugin
Files in dionyang25/yii2-swoole-plugin
Download dionyang25/yii2-swoole-plugin
More information about dionyang25/yii2-swoole-plugin
Files in dionyang25/yii2-swoole-plugin
Please rate this library. Is it a good library?
Informations about the package yii2-swoole-plugin
yii2-swoole-plugin
一个用于在swoole上运行yii2项目的composer包,类似的其实是有的,自己写了一个简单版的。
composer包安装
composer包地址
https://packagist.org/packages/dionyang25/yii2-swoole-plugin
如何启动
- 配置console设置(config/console.php),在component中添加组件
这里可以加入对swoole的配置,支持的配置如下(下图为默认配置)
-
准备入口文件,该入口文件主要是设置你的YII应用服务器的启动参数,最终返回一个合并的启动数组配置即可
-
添加console启动控制器
-
需要修改nginx配置如下,注意,如果在yii2中启用pathinfo模式,那么三个额外的header必须要添加,否则无法正确匹配路由。 示例如下:
- 控制台使用如下命令启动
All versions of yii2-swoole-plugin with dependencies
PHP Build Version
Package Version
No informations.
The package dionyang25/yii2-swoole-plugin contains the following files
Loading the files please wait ....