Re: Show Filename using Wildcards
| From: | Rahul Sitaram Johari | Date: | Thu, 29 Mar 2007 19:59:58 +0000 |
| Subject: | Re: Show Filename using Wildcards | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251678@lists.php.net to get a copy of this message | ||
Awesome!! This Works!!
<?php
exec("find /Users/rjohari/Documents/XFER/espi -type f -name
".$row['PHONE']."*.vox", $files);
foreach ($files as $value) {
echo basename($value)."<br>";
}
?>
THANKS!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rahul Sitaram Johari
CEO, Twenty Four Seventy Nine Inc.
W: http://www.rahulsjohari.com
E: sleepwalker@rahulsjohari.com
“I morti non sono piu soli ... The dead are no longer lonely”
On 3/29/07 3:52 PM, "Ben Roberts" <list-support@headsnet.com> wrote:
> Rahul Sitaram Johari wrote:
>
>> So I have to accomplish two things:
>>
>> 1. I have to eliminate the filepath from the result
>> 2. I need to specify the variable that holds the phone number, (like
>> $row[ŒPHONE¹]) instead of the actual phone number in the ³exec² command.
>>
>> Thanks!! Much Appreciated!
>>
>
> To get the filename component without the path, just use the basename()
> function:
>
> $file = basename($path);
>
> Ben