Connecting Tech Pros Worldwide Help | Site Map

One liner for finding a file

D. Alvarado
Guest
 
Posts: n/a
#1: Jul 17 '05
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
steve
Guest
 
Posts: n/a
#2: Jul 17 '05

re: One liner for finding a file


"D. Alvarado" wrote:[color=blue]
> Hello, Does anyone have a PHP 4 one-liner (or two-liner) for[/color]
extracing[color=blue]
> 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[/color]

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
Closed Thread


Similar PHP bytes