如何在php中将查询字符串作为查询字符串的值传递

时间:2013-10-24 05:49:02

标签: php

我想在php中传递查询字符串作为另一个查询字符串的值。]

mycode的:

$url3="http://hscore3.php?try=1&name=xyz";
$string3="http://ww.php?url=".$url3;
header("location:$string3");

在ww.php中:

echo $_REQUEST['url'];

在执行此操作时,我输出为:

"http://hscore3.php?try=1"

但我想:

"http://hscore3.php?try=1&name=xyz"

如何获得这个?有什么建议?

1 个答案:

答案 0 :(得分:1)

$url3="http://hscore3.php?try=1&name=xyz";
$string3="http://ww.php?url=".rawurlencode($url3);
header("location:$string3");
相关问题