swoole_async_readfile

(PECL swoole >= 1.9.0)

swoole_async_readfileRead a file asynchronously

說(shuō)明

swoole_async_readfile(string $filename, callable $callback): bool

參數(shù)

filename

The filename of the file being read.

callback
callback(string $filename, string $content): mixed
filename

The name of the file.

content

The content read from the file.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。