L
L
LuidgiVamp2018-03-22 10:08:40
PHP
LuidgiVamp, 2018-03-22 10:08:40

How to fix the error? header("Location:". $_SERVER['PHP_SELF']);?

Warning: Cannot modify header information - headers already sent by (output started at C:\Server\domains\messbox\config.php:18) in C:\Server\domains\messbox\actions\login.php on line 12
on line 12 - header("Location:".$_SERVER['PHP_SELF']);
What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Khomenko, 2018-03-22
@LuidgiVamp

Headers can be sent BEFORE any output. That is, if you did echo, then the headers can no longer be sent, which PHP tells you about.
>Warning: Can't modify header information - headers already sent (output started in C:\Server\domains\messbox\config.php:18) in C:\Server\domains\messbox\actions\login.php on line 12

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question