Posted by Rik on 02/23/07 17:33
On Fri, 23 Feb 2007 18:17:36 +0100, laredotornado@zipmail.com =
<laredotornado@zipmail.com> wrote:
> Hi,
>
> Using PHP 4.4.4.
>
> What is the easiest way to return the full path of a file if I know
> the directory it is in and the beginning part of the file (it will
> begin with the word "header")?
<?php
$dir =3D getcwd();
chdir('/path/to/you/dir');
$matches =3D glob('header*');
chdir($dir);
?>
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|