$request->server('REMOTE_ADDR', '');
after including common.php?Yay, that works - thanks so much!kasimi wrote:Can't you use$request->server('REMOTE_ADDR', '');
after including common.php?
request_var()
ends up using \phpbb\request\request_interface::REQUEST
even when passing \phpbb\request\request_interface::SERVER
to it.$request
is the way to do it in 3.1.x, request_var()
is deprecated.boardman wrote:What do I use now?
Code: Select all
$variable = $request->variable('variable', 'some_default_value');
Yes, that one.rxu wrote:EDIT: Or do you mean assigning the value to the global array node?
boardman wrote:$_REQUEST['variable']="value";
$request->overwrite("variable", "value", \phpbb\request\request_interface::REQUEST);