The Directory user-defined function PHP does not provide functions for querying the directory size, copying directories, and deleting directories with files. you only need to write this function by passing a url, you can recursively query the file size in the directory to calculate the directory size 1 & lt ;? Php2functiondirSize ($ dir) {3 $ dirsize0; 4 $ urlopendir ($ d Directory user-defined function
PHP does not provide functions for querying the directory size, copying directories, and deleting directories with files. we need to compile the function by ourselves.
This function can recursively query the file size in the directory by passing a url to calculate the directory size.
1
This function requires two URLs, the old directory and the new directory, to copy the directory and file.
1
This function can recursively delete files in directories and subdirectories by passing a url to delete directories.
1