Determines whether the directory is empty, true is null, false is not 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. Determine if the directory is empty introduction://Determine whether the directory is empty, True is empty, false is not empty function Is_empty_dir ($fp) {$H = @ opendir (
1. About PHP Readdir () functions 10 articles recommended
Description://Determine if the directory is empty, True is empty, false is not empty function Is_empty_dir ($fp) { $H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) { $ i++; } close.
2. About PHP Opendir () functions 10 articles recommended
Description://Determine if the directory is empty, True is empty, false is not empty function Is_empty_dir ($fp) { $H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) { $ i++; } close.
3. Recommended 10 articles for the PHP dir () function
Description://Determine if the directory is empty, True is empty, false is not empty function Is_empty_dir ($fp) { $H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) { $ i++; } close.
4. About PHP Closedir () functions 10 articles recommended
Summary: Determine if the directory is empty, True is empty, false is not empty function Is_empty_dir ($fp) { $H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) { $ i++; } close ...
5. Java instance-determine if the directory is empty
Summary: The following example demonstrates using the File.isdirectory (), File.list (), and File.getpath () methods of the File class to determine if the directory is empty:
6. Determine if the directory is empty
Summary://Determine if the directory is empty, true is null, false is not empty function Is_empty_dir ($fp) {$H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) {$i + +;} C Losedir ($H); if ($i >2) {return false ...
7. Determine if the directory is empty
Summary://Determine if the directory is empty, true is null, false is not empty function Is_empty_dir ($fp) {$H = @ opendir ($fp); $i =0; while ($_file=readdir ($H)) {$i + +;} C Losedir ($H); if ($i >2) {return false ...
8. PHP is_file,file_exists differences, Is_file can not substitute for file_exits reasons
Introduction:: Php is_file,file_exists differences, is_file can not replace file_exits reason: Is_file determine whether the file exists and check whether the specified file name is a normal file; file_exists Determine whether the file exists or whether the directory exists; Is_dir determine if the directory exists; View the manual, although the results of both functions will be cached, but is_file is faster than n times. Another note: In the case of a file, Is_file is faster than file_exists, and is_file is slower than file_exists in the absence of a file;
9. PHP to determine whether a file or directory exists _php tutorial
Summary: PHP Determines whether a file or directory exists. PHP to determine whether a file or directory exists method is very simple PHP to determine whether a file or directory has its own function, file_exists file exists, determine whether the directory exists we use Is_
PHP determines whether a file or directory (folder) exists _php tutorial
Summary: PHP Determines whether a file or directory (folder) exists. PHP determines whether a file or directory (folder) exists in PHP library from the judge whether the file or directory exists function, file_exists determine whether the file exists, Is_dir determine the directory (folder) is
"Related question and answer recommendation":
Io-java about file directory operations