Mistake:
Warning: Cannot modify header information - it has already been sent (by D: \ OpenServer \ domains \ as \ vendor \ fenom \ fenom \ src \ Fenom \ Template.php (487): eval () 'd code: 7) in D: \ OpenServer \ domains \ as \ app \ classes \ Core.php on line 29
I scanned all the code, looked for problems with include, etc., but did not find a solution. I use PHP7 and I can’t figure it out.
Core.php code:
/** * @param string $page */ static function stop($page = '/') { header('location: '.$page); exit; } The file itself in which the error:
<?php if($Auth->isLoginned()) { Core::stop(); } include INC. 'header.php'; Lang::addWords('registration.ini'); $title = Lang::tr('Registration.title'); if(!empty($_POST)) { $fraction = abs(intval($_POST['fraction'])); Sessions::set('fraction', $fraction); Core::stop('/auth/start/sex'); } $fraction = array(); $fraction = Vars::get('db')->query('SELECT `id`,`name` FROM `fraction` ORDER BY `member` ASC')->fetch_all(); Vars::get('fenom')->display('tutorial/start.tpl', ["fraction" => $fraction]); include INC. 'footer.php'; Help me please.
header('location: ...)inCore::stop()- teranevalfunction in the specified template displays something on the screen. After this redirect can not be done. Because in fact, you need to send a 302 response code, and the 200 has already been sent. - teran