php:我想用location传一个变量 header("Location: message.php?POST_ID=" . $post_id); 为什么传不出去

php:我想用location传一个变量 header(

header("Location: message.php?POST_ID=" . urlencode($post_id));//在执行这一句前不要有任何输出,如果有标点符号或中文等要加urlencode函数转址

?>

你在header之前查看下你的$post_id是什么值.

语句正确的 应该是post_id赋值不成功

header(),前边不能有输出哦!