Create a folder:
mkdir system functions, the first parameter is the path, the second parameter is the permission, the third parameter is whether to create recursively, the default permissions are 0777 maximum permissions, there is no so-called permissions under Windows, under Linux can set permissions, if the directory exists will return false, error.
Recursive creation:
Parameter value: Ture/false
#例如想要在这个路径下创建一个文件夹 $path='./dir/a/b/c'; #如果中间有目录缺失, is not automatically created, default is no recursive creation # If created recursively, these directories can be generated automatically by the
Is_dir: You can determine whether a directory exists before you create it.
DirName: can get relative parent path for example the current script path is: [./dir/a/b/c/d] can get to [./dir/a/b/c]
Realpath: Can get the absolute path from the drive letter to the script
Open folder:
Opendir: Open Directory, return resource type
Readdir: Open the folder's resource, the return value is the name of the folder
Closedir: Close the directory, try to close it manually, save system resources
Common ways to manipulate files in PHP