How can I get all sub-directories of a given directory without files, .
(current directory) or ..
(parent directory)
and then use each directory in a function?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- how to split a list into a given number of sub-lis
- Can php detect if javascript is on or not?
You can use the glob() function to do this.
Here is some documentation on it: http://php.net/manual/en/function.glob.php
Find all PHP files recursively. The logic should be simple enough to tweak and it aims to be fast(er) by avoiding function calls.
Almost the same as in your previous question:
Replace
strtoupper
with your desired function.You can try this function (PHP 7 required)
The Spl DirectoryIterator class provides a simple interface for viewing the contents of filesystem directories.
In Array:
//access:
Example to show all: