Or syntax for directory search

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


We use a script written in PHP that uses a simple ls command to
identify files typed into a form.  Our directory structure includes
either a one or two steps away from public directory location of
files, in other words, either

1. [DIR]/[file].[ext] or
2. [DIR]/[DIR]/[file].[ext]

current syntax


stops at 1 and fails to find files in 2

I modified as follows


without success.

Anyone know the right regular expression syntax for PHP to properly
configure script to look for a possible subdirectory prior to
determining whether or not a file type exists or not?



Site Timeline