热阻测试:php get传递动态变量

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/11 12:19:00
请问我想用get方式传递网页中的一个变量 $xxx
应该怎么写

header('Location: denglu.php?encode=$enc_text');

$enc_text 是我的变量 要在这个文件中变化
我使用echo 也不可以

header('Location: denglu.php?encode=$enc_text');
这里错了,应该用双引号
header("Location: denglu.php?encode=$enc_text");

在denglu.php 中可用

echo $_GET['encode'];//输出GET变量