Download the PHP package nerburish/yii2-thread without Composer
On this page you can find all versions of the php package nerburish/yii2-thread. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nerburish/yii2-thread
More information about nerburish/yii2-thread
Files in nerburish/yii2-thread
Download nerburish/yii2-thread
More information about nerburish/yii2-thread
Files in nerburish/yii2-thread
Vendor nerburish
Package yii2-thread
Short Description yii2 multi thread with fsockopen
License MIT
Homepage https://github.com/krissss/yii2-thread
Package yii2-thread
Short Description yii2 multi thread with fsockopen
License MIT
Homepage https://github.com/krissss/yii2-thread
Please rate this library. Is it a good library?
Informations about the package yii2-thread
yii2 multi thread
yii2 使用 fsockopen 模拟多线程操作
安装
推荐使用 composer.
或添加下面代码到composer.json
文件
然后使用
使用方式
1.进行配置
basic 模版为 config/web.php, advanced 模版为对应入口的 config/main.php
示例配置如下:
2.继承和改写
编写控制器来接收异步处理的链接
继承 \kriss\thread\controllers\WebThreadController
然后编写对应的 Action
3.使用
比如控制器下有个 Action 如下:
则在需要调用异步处理的脚本中使用:
链接['/web-thread/send-message','message'=>'hello world']
将会在"本次请求脚本执行结束之前"(参考:register_shutdown_function)
使用fsockopen
方式发起请求访问
All versions of yii2-thread with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
*
The package nerburish/yii2-thread contains the following files
Loading the files please wait ....