Re: Show Filename using Wildcards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx

“I morti non sono piu soli ... The dead are no longer lonely”



On 3/29/07 3:52 PM, "Ben Roberts" <list-support@xxxxxxxxxxxx> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux