在php中通过url传递数组
我希望通过url传递一个数组。我查了一下。没有别的办法吗?下面是我的代码在php中通过url传递数组,php,Php,我希望通过url传递一个数组。我查了一下。没有别的办法吗?下面是我的代码 $result=Users.LoggedInUsers(); header('Location: http://localhost/Campus/Users.php?id='.$result.''); 退房 您可以轻松地将其删除,然后取消序列化以将其恢复到阵列: $result=serialize(Users.LoggedInUsers()); header('Location: http://localhost/Ca
$result=Users.LoggedInUsers();
header('Location: http://localhost/Campus/Users.php?id='.$result.'');
退房
您可以轻松地将其删除,然后取消序列化以将其恢复到阵列:
$result=serialize(Users.LoggedInUsers());
header('Location: http://localhost/Campus/Users.php?id='.$result.'');
如果从URL取消序列化不受信任的输入,请确保验证数组的全部内容。它显示以下错误警告:标头不能包含多个标头,在Users上检测到新行。php i did$booksArr=$_GET['id']$结果=取消序列化(urldecode($booksArr));
$result=serialize(Users.LoggedInUsers());
header('Location: http://localhost/Campus/Users.php?id='.$result.'');