This question has already been answered:

Gives an error - Cannot modify header information - headers already by (output started at Z: \ home \ localhost \ www \ index.php: 1) in Z: \ home \ localhost \ www \ index.php on line 1

$db_host = 'localhost'; $db_user = 'root'; $db_password = ''; $db_database = 'newster'; $db_server = mysql_connect($db_host, $db_user, $db_password); if(!db_server) die("Don`t connect is mysql" . mysql_error()); mysql_select_db($db_database) or die("Don`t select DB " . mysql_error()); header ('Location: views/index.html'); 

Reported as a duplicate by participants of ReinRaus , AK , user194374, Alex , Anton Shchyrov 6 Jan '17 at 15:33 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • And what about this piece? php says that the header has already been sent, and now the response body is being sent. Maybe some echo wormed. Or even some infection. - alexlz 2:24 pm
  • one
    Offtopic: "Don t connect is MySQL" и "Don t select DB" killed :) - void
  • @void How easy it is to kill you. Here they write in Russian, so that without an interpreter, you are trying to disassemble, and you are talking about the aglitsky language ... - alexlz

1 answer 1

UTF8 without bom