First, let's talk about \ n, \ r, \ t
\ N soft carriage return:
In Windows, line breaks are displayed and returned to the beginning of the next line.
In Linux and UNIX, it only indicates line breaks, but does not return to the starting position of the next line.
\ R Soft Space:
In Linux and UNIX, return to the starting position of the row.
In Mac OS, line breaks are displayed and returned to the start position of the next line, which is equivalent to \ n in windows.
\ T hop (move to the next column)
Notes:
They are valid in double quotes or delimiters, and are invalid in single quotes.
\ R \ n is generally used together to represent the carriage return key (in Linux and UNIX) on the keyboard. \ n (in windwos) can also be used only, and \ r is used to represent the carriage return in Mac OS!
\ T indicates the "tab" key on the keyboard.
Line feed characters in the file:
Windows: \ n
Linux, Unix: \ r \ n
Mac OS :\CopyCodeThe Code is as follows: <? PHP
$ Dir = "E:/phpworkspace ";
If ($ handle = opendir ($ DIR )){
Echo "directory path: $ DIR/N ";
Echo "included 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" included files:/N ";
}< br> // This is the correct way to traverse the directory
while (false! ==( $ File = readdir ($ handle) {
echo "$ File/N";
}< BR >?>