<?php
/**
* 读取文件
* __DIR__
*/
$result = Swoole\Async::readfile(__DIR__."/1.txt", function($filename, $fileContent) {
echo "filename:".$filename.PHP_EOL; // \n \r\n
echo "content:".$fileContent.PHP_EOL;
});
var_dump($result);
echo "start".PHP_EOL;
【thinkphp5+swoole赛事直播教程系列11】异步读文件
猜你喜欢
转载自blog.csdn.net/qq2942713658/article/details/82775057
今日推荐
周排行