• Главная
  • Поиск
    •  
  • Здравствуйте, Гость

Автор Тема: osc_redirect_to  (Прочитано 846 раз)
  • *
  • Сообщений: 19
« : 24 Май 2018, 10:28:14 »
Функция
Цитировать
function osc_redirect_to($url, $code = null) {
    if(ob_get_length()>0) {
        ob_end_flush();
    }
    if($code!=null) {
        header("Location: ".$url, true, $code);
    } else {
        header("Location: ".$url);
    }
    exit;
}
выдает ошибку
PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/***/oc-includes/osclass/utils.php:1738) in /home/***/oc-includes/osclass/utils.php on line 1743

Закомментировал
 if(ob_get_length()>0) {
        ob_end_flush();
    }

идет без ошибок.
Может ли это сказаться в дальнейшем ?

P.S. Также в utils.php в конце не было закрывающего ?> (версия 3.7.4.)



 


test