Folder (including subfolders and files), take the path and file name of all files suffixed with JPG under the folder and subfolders, and put the path and file name in the array to calculate how many files
The FOR loop is smaller than the total number of files.
Take the file name and path in sequence. Put arr in a two-dimensional array [0] [0] put the file name arr [0 [1] put the path
Loop ends
Reply to discussion (solution)
$ Path [] = 'images'; for ($ I = 0; $ I
Path: D: \ tupian. Where does the program add this path?
Take the JPG file under D: \ tupian, and the JPG file in all subdirectories of D: \ tupian.
$ Path [] = 'd: \ tupian ';
How did you learn programming? What's the opposite?
"Dirname ($ v)", can this location be replaced by an absolute path with a file name?
I don't know what you're talking about.
$ Res [] = array (dirname ($ v), basename ($ v ));
In this sentence, dirname ($ v) can be changed to a path containing a file name,
Path containing the file name, for example, d:/mulu/1.jpg.
Do you know $ v?