当用户在我的登录屏幕上输入他们的详细信息时,我最终会出现以下错误:
警告:无法修改标头信息 - 已经发送的标头(输出始于/customers/2/a/e/somedomain.co.uk/httpd.www/Francium/logSys/example-two-step-login/login .php:14)在/customers/2/a/e/somedmain.co.uk/httpd.www/Francium/logSys/class.logsys.php第448行警告:
setcookie(
"logSyslogin",
hash("sha256", self::$config['keys']['cookie'] . $us_id . self::$config['keys']['cookie']),
strtotime(self::$config['cookies']['expire']),
self::$config['cookies']['path'], self::$config['cookies']['domain']
);
无法修改标题信息 - 已经发送的标题(输出从/customers/2/a/e/somedomain.co.uk/httpd.www/Francium/logSys/example-two-step-login/login.php开始:14)在/customers/2/a/e/somedomain.co.uk/httpd.www/Francium/logSys/class.logsys.php 1060行
public static function redirect($url, $status = 302){
header("Location: $url", true, $status);
exit(0);
}
答案 0 :(得分:0)
这是由login.php
的第14行的输出引起的。如果你回应一些东西,PHP必须发送标题,以便您的浏览器能够显示它。发送后,您无法修改