First, let’s talk about n, r, t
n Soft return:
In Windows, it means a line break and returns to the beginning of the next line.
In Linux and Unix, it only means a line break, but it does not return to the beginning of the next line.
r Soft space:
In Linux and Unix, it means returning to the beginning of the current line.
In Mac OS, it means wrapping and returning to the beginning of the next line, which is equivalent to the effect of n in Windows.
t Tab (move to next column)
A few notes:
They are valid in strings represented by double quotes or delimiters, but not in strings represented by single quotes.
rn are generally used together to represent the Enter key on the keyboard (in Linux and Unix). You can also just use n (in Windows). In Mac OS, use r to represent Enter!
t means the "TAB" key on the keyboard.
Newline symbol in the file:
windows: n
linux,unix: rn
Mac OS:
Copy the code The code is as follows:
$dir = "E:/PHPworkspace";
if($handle = opendir($dir)){
echo "The 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 the code The code is as follows:
$dir = "E:/PHPworkspace";
if($handle = opendir($dir)){
echo "The 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";
}
?>
The above introduces the photoshop cs5 official Chinese official original download PHP instructions for using spaces, line breaks, and tabs, including the content of photoshop cs5 official Chinese official original download. I hope it will be helpful to friends who are interested in PHP tutorials.