You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
10
vendor/swoole/examples/async/readfile.php
vendored
Executable file
10
vendor/swoole/examples/async/readfile.php
vendored
Executable file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
swoole_async::set(['aio_mode' => SWOOLE_AIO_LINUX]);
|
||||
|
||||
swoole_async_readfile(__DIR__.'/../test.jpg', function($filename, $content){
|
||||
echo "file: $filename\ncontent-length: ".strlen($content)."\nContent:\n";
|
||||
swoole_async_writefile(__DIR__.'/test.copy', $content, function($write_file) {
|
||||
echo "file: $write_file\n";
|
||||
swoole_event_exit();
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user