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?
I have written a scanner that works very well and scans directories and subdirectories in each directory and files.
Example
returns:
Proper way
Inspired by Laravel
Here is how you can retrieve only directories with GLOB:
you can use glob() with
GLOB_ONLYDIR
optionor