登錄後我想將用戶發回$value
, $value
用我的代碼生成,打印出來,看起來不錯。
這是一個完整的URL:http://example.com/page.php?id=6
,
卻忽略了header("Location: ".$value);
聲明:
if($iniciando->iniciar()) {
if (isset($_SESSION['redirect'])) {
$he ="http://funcook.com" . $_SESSION['redirect'];
mostrar_notificacion($he);
header("Status: 301");
header("Location: " . $he, true, 301);
} else {
imprimir_sesion_iniciada();
}
} else {
imprimir_formulario_sesion();
}
也許顯示完整的代碼。之後你會做一個「死()」嗎? – 2011-01-14 00:40:45
您在此代碼之前是否打印過任何內容?嘗試exit();在標題() – 2011-01-14 00:41:25
`die`之後`die`不需要重定向工作。打開錯誤,你可能會得到一個標題已經發出警告,馬特建議。 – webbiedave 2011-01-14 00:44:35