Output text file with line breaks in PHP

前端 未结 9 1061
一个人的身影
一个人的身影 2020-11-28 14:11

I\'m trying to open a text file and output its contents with the code below. The text file includes line breaks but when I echo the file its unformatted. How do I fix this?<

9条回答
  •  温柔的废话
    2020-11-28 14:49

    You need to wrap your PHP code into ?>, and save it as .php or .php5 (depends on your apache set up).

提交回复
热议问题