First of all, \n,\r,\t.
\ n Soft return:
Show line breaks in Windows and go back to the beginning of the next line
In Linux, Unix only represents line breaks, but does not go back to the beginning of the next line.
\ r Soft Space:
In Linux, Unix represents the return to the beginning of the line.
Represents a newline in Mac OS and returns to the beginning of the next line, equivalent to the effect of \ n in Windows.
\ t jump (move to next column)
A few notes:
They are valid in a double-quote or delimiter-represented string, and are not valid in a single-quote string.
\ r \ n generally used together, used to indicate the key on the keyboard return (Linux,unix), can also be used only \ n (windwos), in Mac OS with \ r to indicate enter!
\ t represents the "tab" key on the keyboard.
Line break symbols in the file:
Windows: \ n
Linux,unix: \ r \ n
Mac OS: \
Copy CodeThe code is as follows:
$dir = "E:/phpworkspace";
if ($handle = Opendir ($dir)) {
echo "directory path is: $dir/n";
echo "contained files:/n";
}
This is the correct way to traverse the directory
while (False!== ($file =readdir ($handle))) {
echo "$file/n";
}
?>
Copy CodeThe code is as follows:
$dir = "E:/phpworkspace";
if ($handle = Opendir ($dir)) {
echo "directory path is: $dir/n";
echo "contained files:/n";
}
This is the correct way to traverse the directory
while (False!== ($file =readdir ($handle))) {
echo "$file/n";
}
?>
http://www.bkjia.com/PHPjc/321101.html www.bkjia.com true http://www.bkjia.com/PHPjc/321101.html techarticle first of all, let's talk about \n,\r,\t. Soft return: In Windows, a newline is represented, and the beginning of the next line is the first position in Linux, Unix, but not back to the beginning of the next line. \...