Initial commit,修正

This commit is contained in:
2025-07-13 19:37:38 +08:00
parent 38ce288e27
commit 65bbd06981
12384 changed files with 3985464 additions and 8 deletions
+29
View File
@@ -0,0 +1,29 @@
原文参考:
http://blog.csdn.net/thy38/article/details/54090242
push.php文件完成后,
在当前所在目录运行:(以daemon(守护进程)方式启动)
php push.php start -d
停止
php start.php stop
重启
php start.php restart
平滑重启
php start.php reload
查看状态
php start.php status
其实挺简单的,就是把Yii2应用的index.PHP中的内容放到Worker的代码前面,只是要把run改为init:
注意几点,
1. debug组件不用加载了,加载也没有意思,因为没有request,所以会报错
2. 最好也定义一个index.php作为整个workerman的入口,这样可以在main.php加载之前初始化一些YII_DEBUG这样的全局变量。