Determines whether the directory is empty. true is empty. false is null. functionis_empty_dir ($ fp) & amp; nbsp; & amp; nbsp ;{& amp; nbsp; & amp; nbsp; $ H @ opendir ($ fp); $ i0; & amp; nbsp; while ($ _ filereaddir ($ H) {& amp; nbsp; & amp; nbsp; $ I ++; & amp; nbsp ;}& amp; nbsp; & amp; nbsp; close... // Determine whether the directory is empty. true is empty. false is empty. function is_empty_dir ($ fp) {$ H = @ opendir ($ fp); $ I = 0; while ($ _ file = readdir ($ H) {$ I ++;} closedir ($ H); if ($ I> 2) {return false ;} else {return true ;}}
1. check whether the directory is empty.
Introduction: php, directory: Directory of PHP: Directory operation create directory mkdir (path, permission, recursive creation) delete directory rmdir () move (rename) rename () get the directory content // open the directory handle = opendir () // read the directory file name = readdir (Directory handle) read the file name in sequence, and move the file handle pointer down, if no value is obtained, false is returned. // Close the directory closedir () to recursively read the directory content.
4. what is hiberfil. sys? PHP file read, write, and delete operations: PHP file and directory operations
Description: hiberfil. what is sys File: hiberfil. sys is a PHP file read, write, or delete operation. operations on files and directories in PHP: 1. Directory operations first introduce a function read from the directory, opendir (), readdir (), closedir (). when used, the file handle is opened first, and then the code is listed iteratively: "
5. what is ringtones? PHP creates a file folder and directory operation code
Introduction: What is ringtones folder PHP creates file folders and directory operation code: 1. Directory operations are first the functions read from the directory, opendir (), readdir (), closedir (). when used, the file handle is opened first and then iteratively listed: the code is as follows: "; While ($ flist = readdir ($ fso )){
6. summary of the php directory management function of the national basic medical insurance and industrial injury insurance drug catalog
Brief introduction: national basic medical insurance and work injury insurance Drug Directory: national basic medical insurance and work injury insurance drug directory php Directory Management Function Summary: chdir: Change Directory. Dir: directory category. Closedir: close the directory handle. Opendir: Open the directory handle. Readdir: Read the directory handle. Rewinddir: reset the directory handle. Chdir changes the directory. Syntax: int chdir (string directory); return value: integer function type: file access content description this function is used to change the current
7. php directory management function summary _ PHP Tutorial
Summary of php directory management functions. Chdir: change the directory. Dir: directory category. Closedir: close the directory handle. Opendir: Open the directory handle. Readdir: Read the directory handle. Rewinddir: reset the directory handle.
8. PHP file creation (folder) and directory operation code _ PHP Tutorial
Introduction: PHP creates files (folders) and directory operation code. I. Directory operations are the first functions read from the directory, including opendir (), readdir (), and closedir (). when used, the file handle is opened first, and then listed iteratively: the code is as follows :? Php $ base
9. PHP file read, write, and delete operations (file and directory operations in PHP) _ PHP Tutorial
Introduction: PHP file read, write, and delete operations (file and directory operations in PHP ). I. Directory operations first introduce a function that reads data from a directory, such as opendir (), readdir (), and closedir (). when using this function, open the file handle first, and then list it iteratively: the code is as follows:
10. PHP file creation (folder) and directory operation instance _ PHP Tutorial
Introduction: PHP creates File (folder) and directory operation instances. I. Directory operations are the first functions read from the directory, such as opendir (), readdir (), and closedir (). when used, the file handle is opened first, and then listed iteratively :? Php $ base_dir = liehuonet/; $ fso = open
The above is a detailed article about the php closedir () function. For more information, see other related articles in the first PHP community!