入门指引 Server Client Process AsyncIO Memory HttpServer WebSocket 高级 其他

发布于 2015-08-09 09:52:23 | 229 次阅读 | 评论: 0 | 来源: 网络整理

异步写文件,与swoole_async_writefile不同,write是分段读写的。不需要一次性将要写的内容放到内存里,所以只占用少量内存。swoole_async_write通过传入的offset参数来确定写入的位置。

bool swoole_async_write(string $filename, string $content, int $offset = -1, mixed $callback = NULL);
  • 当offset为-1时表示追加写入到文件的末尾
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务