2025-04-10 23:19:13 +08:00

30 lines
707 B
Plaintext
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

原文参考:
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这样的全局变量。