<分区>
- 代码在双引号中,但仍然无法正常工作。
- I already read this post
- 我正在使用 Atom 并且在本地主机上(如果这有什么不同的话)
- 我重新下载了 Atom(以防设置出现问题)但没有帮助
代码如下:
<?php
$firstName = 'David';
$lastName = "Powers";
$title = '"The Hitchhiker\'s Guide to the Galaxy"';
$author = 'Douglas Adams';
$answer = 42;
$newLines = "\r\n\r\n";
$fullName = "$firstName $lastName |";
$book = "$title by $author";
$message = "Name: $fullName $newLines";
$message .= "Book: $book \r\n\r\n";
$message .= "Answer: $answer";
echo $message;
echo "Line 1\nLine 2";
输出都是一行,但是当我查看源代码时,新行正在工作
Name: David Powers | Book: "The Hitchhiker's Guide to the Galaxy" by Douglas Adams Answer: 42Line 1 Line 2