A
A
andrei20192018-07-29 21:22:03
PHP
andrei2019, 2018-07-29 21:22:03

Why does it say that the header has already been sent?

The site works fine in Ubuntu, but it needed to be launched in Denwer on Win10 and here are the messages:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at Z:\home\localhost \www\index.php:1) in Z:\home\localhost\www\index.php on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\index.php:1) in Z:\home\localhost\www\index.php on line 1

<?php session_start();  <--- специально на строку выше поднял, но ошибка не исчезла.
//phpinfo(8);
?>
<!DOCTYPE html>
<html lang="ru">
...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-07-29
@andrei2019

wangyu: the file is saved encoded with bom.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question