-3
我得到这个错误:警告:不能更改头信息 - 头已经发出的(输出开始/Applications/XAMPP/xamppfiles/htdocs/recover.php:11)/应用程序/ XAMPP/xamppfiles/htdocs中/ recover.php上线22警告:不能更改头信息
这是我的代码,以便您可以看看:
<?php
include 'core/init.php';
logged_in_redirect();
?>
<h1> Recover </h1>
<?php
if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
?>
<p>thanks we have emailed you</p>
<?php
} else {
$mode_allowed = array('username', 'password');
if(isset($_GET['mode']) === true && in_array($_GET['mode'], $mode_allowed) === true) {
if(isset($_POST['email']) === true && empty($_POST['email']) === false){
if (email_exists($_POST['email']) === true) {
recover($_GET['mode'], $_POST['email']);
header('Location: recover.php?success');
exit();
} else {
echo 'we cant find that email in our database';
}
}
?>
<form action="" method="post">
Please enter your email adress:<br>
<input type="text" name="email"><br>
<input type="submit" value="Recover!">
</form>
<?php
} else {
header('Location: index.php');
exit();
}
}
?>
任何想法我如何能解决这个问题? 在此先感谢
要么执行javascript/meta刷新,要么删除'
恢复
'和if语句中的html。 –解决!多谢你们! –
可能是咬人的php功能的前3名...... – fvu