";" before the EOL statement to format the text."/> ";" before the EOL statement to format the text.">

Home  >  Article  >  Backend Development  >  What should I do if php eol doesn't work?

What should I do if php eol doesn't work?

藏色散人
藏色散人Original
2021-09-19 09:27:132078browse

php The solution for eol not working: 1. Open the corresponding code file; 2. Add the code "echo "

";" before the EOL statement and do text formatting. 

What should I do if php eol doesn't work?

#The operating environment of this article: Windows7 system, PHP7.1, Dell G3 computer.

What should I do if php eol doesn't work?

PHP_EOL is a text line break, not an html line break. Add echo "

"; in front to format the text, and the PHP_EOL behind it will work. 

Detailed analysis:

1. For the browser, the text is processed Line breaks must be achieved using the tag
. Usually line breaks of text in files cannot be displayed as usual in the browser and are only valid for text files.

The results generated by the PHP script still need to be displayed in the browser, so if you want to wrap the line, try to use html tags like

to complete it.

2. You can view the source code to see whether PHP_EOL works.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if php eol doesn't work?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn