【文件属性】:
文件名称:yii_swoole_task
文件大小:6.08MB
文件格式:ZIP
更新时间:2021-05-31 05:12:47
PHP
yii_swoole_task
在YII框架中结合了swoole 的task 做了异步处理。
本例中 主要用到
1、protected/commands/ServerCommand.php 用来做server。
2、protected/event/下的文件 这里是在异步中的具体实现。
客户端调用参照 TestController
<?php
class TestController extends Controller{
public function actionTT(){
$message['uid'] = 2;
$message['email'] = '83212019@qq.com';
$message['title'] = '接口报警邮件';
$message['contents'] = "'EmailEve