B
B
balabukha2015-11-16 18:40:16
PHP
balabukha, 2015-11-16 18:40:16

PHP: Warning: Cannot modify header information - headers already sent by?

Good day!
I know this question has been asked many times, but no answer fits.
I attached screenshots of how to solve this problem, I checked it on 2 computers already.
ob_start(); tried already left clear cookies and still error.
I'm on Open Server.
033931b59b4b49ea919c249b47d2f032.jpgd815332a38a8462394b70288861a2d25.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey S., 2015-11-16
@balabukha

swap , setcookies should be before the first output (any)
(i.e. yours <?php ...should go on the first line .
Even one space (_) will no longer work, like this error:

_<?php setcookie ...
?>
<html ...

(first character space/tab)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question