Hi,
I think you could use the exec() function to do what I believe you want to accomplish.
For example:
/
On Windows:
exec("dir C:\web\images\.gif /b/s", $file_array, $rc);
On Linux:
exec("ls -R /images/*.jpg", $file_array, $rc);
Note 1: The result of this function call will be stored in $file_array. $rc is for any return code.
Note 2: If you don't specify a beginning path like 'C:\web\images\' for windows or '/images' for linux, it will be assumed that you want a directory listing for the current directory, which would be wherever this script is located in.
Note 3: the '/b' switch for windows means, "return the files to me in bare format". the '/s' switch means to include subdirectories in the search. on linux, the 'ls' command already returns it in bare format and the -R is used to traverse the subdirectories.
I tested this on my Windows box not on Linux, but I know that the Linux command shown above is what is functionally equivalent to the Windows command.
I hope this helps in some way.
Bart