Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用PHP重定向到用户页面_Php_Redirect - Fatal编程技术网

使用PHP重定向到用户页面

使用PHP重定向到用户页面,php,redirect,Php,Redirect,我想在成功登录后将用户重定向到他们的页面。 现在我正在使用: header('Location: http://localhost/test/user.php?id='. $user); 这给了我这种类型的重定向: "" 我希望我的重定向URL如下所示: "" 我试过了 header('Location: http://localhost/test/user.php/'. $user) 但是它没有正确重定向。什么是“但是它没有正确重定向”的意思…?我有一个logout.php的注销链接。当我

我想在成功登录后将用户重定向到他们的页面。 现在我正在使用:

header('Location: http://localhost/test/user.php?id='. $user);
这给了我这种类型的重定向: "" 我希望我的重定向URL如下所示: "" 我试过了

header('Location: http://localhost/test/user.php/'. $user)

但是它没有正确重定向。

什么是“但是它没有正确重定向”的意思…?我有一个logout.php的注销链接。当我点击链接时,不要将我注销,而是将我发送到用户页面上方的注销页面。看起来是这样的:“您需要显示您的代码…”。。。??