正确地从文本文件中读取PHP所需的代码 [英] Code needed to make PHP read from text file Properly
本文介绍了正确地从文本文件中读取PHP所需的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我是php的新手,我需要一些帮助。
我正在尝试为网站编写脚本。
我需要显示的文本是.txt文件,我不能添加中断。
我写了一个函数来打开我的文件。当文本在html中显示时,它全部在一行中。我找不到代码来添加我的功能来处理问题。
可以sombody请帮忙吗?
谢谢
Hello,
I am new to php, and I need some help.
I am trying to write a script for a web site.
Text I need to display is in a .txt file, and I can''t add breaks to it.
I wrote a function that will open my files. When text is displaid in html, it is all in one line. I can not find code to add my function to take care of the problem.
can sombody please help?
Thank you
推荐答案
- 你的文本文件内容是如何出现的?
- 到目前为止,您所编写的代码在哪里?
我需要显示的文本是.txt文件,我不能添加中断。
Text I need to display is in a .txt file, and I can''t add breaks to it.
请解释。
使用 nl2br()用于换行符。
这是我写的功能代码
< ?php
函数open_question(
Here is function code I wrote
<?php
function open_question(
这篇关于正确地从文本文件中读取PHP所需的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文