This is a discussion on One liner for finding a file within the PHP Language forums, part of the PHP Programming Forums category; Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing a file from a directory in ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing
a file from a directory in which I know the word "footer" is guaranteed to be in the file name, I know the precise directory to search, and I am assured that at most one file will match this description. I am looking to get the complete path to this file. Thanks in advance, - Dave |
|
|||
|
"D. Alvarado" wrote:
> Hello, Does anyone have a PHP 4 one-liner (or two-liner) for extracing > a file from a directory in which I know the word "footer" is > guaranteed to be in the file name, I know the precise directory to > search, and I am assured that at most one file will match this > description. I am looking to get the complete path to this file. > > Thanks in advance, - Dave You can always execute an OS command. So you can say in Linux: $a = `ls *footer*`; -- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards Topic URL: http://www.dbForumz.com/PHP-liner-fi...ict138692.html Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=463587 |