Or syntax for directory search

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mikefromvt

    #1

    Or syntax for directory search

    Hi.

    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

    .../*/$[variable].[ext]

    stops at 1 and fails to find files in 2

    I modified as follows

    .../*{1,2}/$[variable].[ext]
    or
    .../*+/$[variable].[ext]

    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?

    Thanks

    Mike

Working...