我遇到了該標題的問題。 當頁面被處理時,我只會退出();功能「標題」不起作用
if($validate=='true') {
$_SESSION['nome'] = $nome;
$_SESSION['cognome'] = $cognome;
$_SESSION['email'] = $email;
$_SESSION['telefono'] = $telefono;
$_SESSION['cellulare'] = $cellulare;
$_SESSION['password'] = $password;
$_SESSION['societa'] = $societa;
$_SESSION['pi'] = $pi;
$_SESSION['cf'] = $tax;
$controllor = md5(uniqid(rand(), TRUE));
ob_start();
header("Location: index.php?nav=8&controllor=".$controllor);
ob_end_flush();
exit();
}
上面的所有變量都被正確填充,$ validate等於'true'。
必須在發生任何輸出之前使用'ob_start()';就像'header()'應該一樣。 – mario