远光狗怎么治:php get传递动态变量
来源:百度文库 编辑:查人人中国名人网 时间:2024/05/16 16:15:13
请问我想用get方式传递网页中的一个变量 $xxx
应该怎么写
header('Location: denglu.php?encode=$enc_text');
$enc_text 是我的变量 要在这个文件中变化
我使用echo 也不可以
应该怎么写
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变量