1. Determine the file type (file OR directory):
FileType (); Returns the type of file: directory dir; file
Is_dir (); Determine if the path is a directory
Is_file (); Determine if the path is not a file
2. Get the properties of a file
Date ("Y-m-d h:i:s", Fileatime ()); Time of last visit
Date ("Y-m-d h:i:s", Filectime ()); File creation time
Date ("Y-m-d h:i:s", Filemtime ()); File modification Time
FileSize (); File size in bytes
File_exists (); Determine if a file exists
3. File path
Current path:./parent directory:. /Subordinate Directory: Directory/root path:/
If it is the root (/) path inside PHP: The root of the disk
If the root (/) path inside the Web page represents: root of the server (WWW directory)
$_server[' Document_root ']; Fetch the root path of the server
BaseName (); Get the filename with a suffix from the path
DirName (); The path before the filename is taken
PathInfo (); Get all information about the directory (in the form of an array)
Realpath (); Convert a relative path to an absolute path
4. Operation Catalogue
Glob (".. /tp/* "); Get all the files in this directory
Glob (".. /tp/*.php "); Get all files with the suffix. PHP under this directory
Dirsize (); Calculate Folder Size
Opendir (); Open Directory Resource
Closedir (); Close Directory Resource
Readdir (); Read the file in the directory, perform a read one
Rewinddir (); Pointer reset
File Operations (PHP)