php中的行终止符 [英] Line terminator in php
问题描述
Hello
手册中php cli章节中的示例以\ n结尾。
例如
echo"总计{$ total}。\ n" ;;
如果不是\ n在Linux \ Unix系统和\\\\ n中在Windows上
系统?甚至是\r在Macintosh上?
如何获得当前平台的行结束标记?
PHP_EOL常量是行结束标记在系统上php是
构建的,所以如果php是交叉编译的,PHP_EOL会有所不同。
是吗?
Timothy Madden ,
罗马尼亚。
total}。\ n" ;;
它应该吗不是\ n在Linux \ Unix系统和\\\\ n中在Windows上
系统?甚至是\r在Macintosh上?
如何获得当前平台的行结束标记?
PHP_EOL常量是行结束标记在系统上php是
构建的,所以如果php是交叉编译的,PHP_EOL会有所不同。
是吗?
Timothy Madden ,
罗马尼亚。
Timothy Madden写道:
Hello
本手册中php cli章节中的示例以\ n结尾。
例如
echo" ;总计{
total}。\ n" ;;
不应该是\ n在Linux \ Unix系统和\\\\ n中在Windows上
系统?甚至是\r在Macintosh上?
如何获得当前平台的行结束标记?
PHP_EOL常量是行结束标记在系统上php是
构建,所以如果php是交叉编译的,PHP_EOL会有所不同。
是吗?
Timothy Madden,
罗马尼亚。
PHP未编译(它被解释),因此不能交叉编译
。您在每个系统上安装脚本源。
-
==================
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
js ******* @ attglobal.net
==================
Hello
The examples in the php cli chapter in the manual end a line with "\n".
For example
echo "Total {$total}.\n";
Should it not be "\n" on Linux\Unix systems and "\r\n" on Windows
systems ? And even "\r" on Macintosh ?
How to I get the end of line marker of the current platform ?
The PHP_EOL constant is the end of line marker on the system php was
build on, so if php was cross-compiled PHP_EOL would be different.
Is that right ?
Timothy Madden,
Romania.
total}.\n";
Should it not be "\n" on Linux\Unix systems and "\r\n" on Windows
systems ? And even "\r" on Macintosh ?
How to I get the end of line marker of the current platform ?
The PHP_EOL constant is the end of line marker on the system php was
build on, so if php was cross-compiled PHP_EOL would be different.
Is that right ?
Timothy Madden,
Romania.
Timothy Madden wrote:Hello
The examples in the php cli chapter in the manual end a line with "\n".
For example
echo "Total {
total}.\n";
Should it not be "\n" on Linux\Unix systems and "\r\n" on Windows
systems ? And even "\r" on Macintosh ?
How to I get the end of line marker of the current platform ?
The PHP_EOL constant is the end of line marker on the system php was
build on, so if php was cross-compiled PHP_EOL would be different.
Is that right ?
Timothy Madden,
Romania.PHP is not compiled (it is interpreted), therefore it cannot be
cross-compiled. You install the script source on each system.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
这篇关于php中的行终止符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!