PHP $_REQUEST 变量不正确


PHP $_REQUEST variables is incorrect

我有一个这样的网址:

www.example.com/account?user=1&other=2

当我想从$_REQUEST解析变量时,它会像这样返回:

q=account?user=1

和 其他=2

我当然想要:user=1other=2

那么,为什么我得到变量q而不是第一个变量(user)?

我尝试使用$_REQUEST['user']但它不存在$_REQUEST

如果我使用 print_r($_REQUEST)它会像这样返回:

Array ( [q] => /account/?user=1 [other] => 2 ) 
You can get it via
$_REQUEST['user']
$_REQUEST['other']
OR
$_GET['user']
$_GET['other']

你可以通过以下方式获得完整的数组

print_r($_REQUEST);

并通过以下方式获取价值

$_REQUEST['user'];
$_REQUEST['other'];

 $_GET['user'];
 $_GET['other'];