How can I find all the file names of a directory or folder and its sub-directories or sub-folders.
I am using scandir()
, but It returns files and sub-directory names both only from root directory.
If anybody have a solution then please suggest.
<?php
$dir = 'mydir/';
$files = scandir($dir);
?>