<?php
Swoole\Coroutine\System::readFile(string $filename)
file location
the content of a file
Alias: Swoole\Coroutine\System::readFile
.
Read the content of a file.
<?php
Co\run(function () use ($filename) {
$filename = __DIR__ . "/test.txt";
$r = co\System::readFile($filename);
var_dump($r);
});