<?php
/**
* descript: phpstrom
* User: singwa
* Date: 18/3/7
* Time: 上午1:53
*/
/**
* 读取文件
* __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;
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/p/8999142.html
浙公网安备 33010602011771号