换行符“\ n”不工作 [英] newline "\n" not working.

查看:101
本文介绍了换行符“\ n”不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码不会产生任何新行。任何想法。


echo"这个跨越多行。新行也将是\ noutput。" ;;

Following code does not produce any new lines. Any ideas.

echo "This spans\multiple lines. The newlines will be\noutput as well.";

推荐答案

对不起...拼写检查纠正了一些。

echo"这个跨越多行。新行也将是\ noutput。" ;;


stevek写道:
Sorry ... spell checker corrected some.

echo "This spans\nmultiple lines. The newlines will be\noutput as well.";

stevek wrote:
以下代码不会产生任何新行。任何想法。

echo"这跨越多行。新行也将是\ noutput。" ;;
Following code does not produce any new lines. Any ideas.

echo "This spans\multiple lines. The newlines will be\noutput as well.";



在活石上雕刻神秘符文,
的最后一句话
stevek of comp.lang.php make plain:
Carved in mystic runes upon the very living rock, the last words of
stevek of comp.lang.php make plain:
stevek写道:
以下代码不会产生任何新行。任何想法。

echo"这跨越多行。新行将很好地输出。
Following code does not produce any new lines. Any ideas.

echo "This spans\multiple lines. The newlines will be\noutput as
well.";



抱歉...拼写检查纠正了一些。

echo这个跨越多线。新行将是\ n输出为
好。" ;;



Sorry ... spell checker corrected some.

echo "This spans\nmultiple lines. The newlines will be\noutput as
well.";




所以,你说这将输出文字字符串:


这个跨越多行。新行也将是'输出。


您在脚本上直接剪切和粘贴之前发布的位是什么?如果

没有,检查你实际上是使用双引号而不是单引号。


-

Alan Little

Phorm PHP表单处理器
http://www.phorm.com /


HTML忽略多余的空格,包括换行符。您是在浏览器中查看

页面还是查看页面的来源?如果您在浏览器窗口中查看输出,那么,PRE标签中的文本是否包含




- 罗伯特

HTML ignores excess whitespace including newlines. Are you viewing the
page in the browser or viewing the source for the page? If you are
viewing the output in the browser window itself, is the text contained
in a PRE tag?

-Robert


这篇关于换行符“\ n”不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆