php如何使用url传值,header("location:x.php")可以进行url传值吗?

2025-03-28 07:17:13
推荐回答(1个)
回答1:

//b.php中
$id = "可变变量的数值";//可变的变量
header('Location:c.php?id='.$id);
?>
//c.php中
$id = $_GET['id'];//用$_GET接收来自b.php传过来的值
?>