Answer the question
In order to leave comments, you need to log in
Why do spaces and line breaks appear?
Unfortunately, I can’t post a code example (a lot of code), or repeat the error on a test example (everything works there).
I have a php file which is included in index.php (include_once).
When calling index.php from a browser, program (post request), line breaks appear as a result
\n\n\n\n\n\n\n\n \r\n\r\n\r\n\r\n\r\n\r\nРезультат!
<?php
echo 'Результат';
//Ниже пустые переносы строк. Обозначаю тут их точкой т.к. этот редактор убирает пустые переносы
?>
.
.
.
echo 'Результат';
Answer the question
In order to leave comments, you need to log in
Remove the closing tag ?>
Because the server sends everything outside the php tags to the browser as it is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question