I have code for find php files from one directory.
$files = glob('./application/controllers/*.{php}', GLOB_BRACE);
Is there any way to find php files from directory within directory.
I mean, if there are some folders in controllers folder and inside those folders php files are there. then, how can I detect those files too.
./application/controllers/*/*.phpBtw. using curly braces andGLOB_BRACEmakes no sense in your example. (But it can, again, when you want to find .php files in the specified directory and sub-directories at the same time, then you’d just have to specify the version without/*/as “alternative”.)