Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Laravel Octane 中获取有关传入请求的信息,例如 ip 地址、标头等。但$_SERVER变量没有REMOTE_ADDR键:
$_SERVER
REMOTE_ADDR
Route::get('/test', function (){ array_key_exists('REMOTE_ADDR', $_SERVER); //false dd(getallheaders()); // [] });
看起来是因为我的服务器上没有 apache 或 nginx,但是 swoole 本身呢?