“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
workerman的http服务-请求-获取指定上传文件
发布时间:2021-12-05 12:26:42作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
获取特定上传文件实例:<?phpuse Workerman\Worker;use Workerman\Connection\TcpConnection;use Workerman\Protocols\Http\Request;require_once __DIR__ . '/vendor/autol
阅读全文>>workerman的http服务-请求-上传文件获取及http的413错误
发布时间:2021-12-05 11:40:56作者:雪饮
![[!--pagekey--]](/d/file/manshenghuo/chengxurensheng/51155c36255656364f4ad2356fa84416.png)
首先呢我们在http中有一种不太常见的错误码就是413码,该码在post上传文件过大时候触发,如:postman真棒:postman在请求最右侧有个code点开后可以看到原生请求及各个开发语言的请
阅读全文>>workerman的Timer定时器类的定时器注意事项-多进程的进程安全(并发问题)
发布时间:2021-12-05 00:17:38作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
多进程设置了,定时任务可能会造成并发问题,例如下面的代码每秒会打印5次。<?phpuse Workerman\Worker;use Workerman\lib\Timer;require_once __DIR__ . '/vendor/autoload.p
阅读全文>>workerman的Timer定时器类的定时器注意事项-定时器id可能重复
发布时间:2021-12-05 00:16:24作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
不同进程间的定时器id可能会重复,但是同一个进程内产生的定时器id不会重复实例:<?phpuse Workerman\Worker;use Workerman\lib\Timer;require_once __DIR__ . '/vendor/autol
阅读全文>>workerman的Timer定时器类的del方法实现定时器删除
发布时间:2021-12-05 00:15:22作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
delboolean \Workerman\Lib\Timer::del(int $timer_id)删除某个定时器 参数timer_id 定时器的id,即add接口返回的整型 返回值boolean 实例:<?phpuse Workerman\Worker;use
阅读全文>>