Light-php icon indicating copy to clipboard operation
Light-php copied to clipboard

Call to undefined function Lib\swoole_async_writefile()

Open zhy654 opened this issue 6 years ago • 0 comments

报错 ERROR php_swoole_server_rshutdown (ERRNO 503): Fatal error: Uncaught Error: Call to undefined function Lib\swoole_async_writefile() in /media/zhy/data/data/htdocs/git/Light-php/frame/Lib/Log.php:57

是因为 https://wiki.swoole.com/wiki/page/p-async.html image

把log改一下 引入 use Swoole\Coroutine\System;

// swoole_async_writefile($dir_path.$filename , $msg, NULL, FILE_APPEND); $filename = $dir_path.$filename; $system = new System(); go(function () use ($filename,$msg, $system) { $r = $system->writeFile($filename,$msg, FILE_APPEND); var_dump($r); });

zhy654 avatar Sep 23 '19 06:09 zhy654