添加swoole日志

//日志内容
$content = [
'date:' => date("Ymd H:i:s"),
'get:' => $request->get,
'post:' => $request->post,
'header:' => $request->header,
];
//存入文件
swoole_async_writefile(__DIR__."/access.log", json_encode($content).PHP_EOL, function($filename){
// todo
}, FILE_APPEND);

相关文章

1.SW的HttpServerHttpServer的本质仍然是swoole_server,其协...
1、Swoole依赖安装hiredissudowgethttps://github.comedis/h...
直接安装会提示找不到openssl/ssl.h文件即便通过Brew安装了O...
1.安装依赖yum install -y php php-pear php-devel ht...
php
下载swoole地址:https://pan.baidu.com/s/1_N3RiFtT3iHLA5x...
昨晚我躺在床上,百无聊赖地翻阅 阿兰·德波顿《身份的焦虑...