workerman打印env

This commit is contained in:
小王 2024-09-13 10:53:01 +08:00
parent 38d848c5a9
commit fb7a0b6ffc
2 changed files with 3 additions and 4 deletions

4
run.sh
View File

@ -5,6 +5,4 @@ php-fpm -D
# 启动nginx # 启动nginx
nginx nginx
# 启动nacos心跳服务 # 启动nacos心跳服务
php ./start.php start > /dev/null php ./start.php start
# hold后台
sh

View File

@ -47,7 +47,8 @@ $task->onWorkerStart = function(Worker $task) use ($serverAddr, $nacosAddr)
}' }'
], ],
]); ]);
echo "send heartbeat: " . $response->getBody()->getContents(); echo "send heartbeat: " . $response->getBody()->getContents() . "\n";
echo json_encode($_ENV, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
echo "\n"; echo "\n";
}); });
}; };