You are here: Re: Searching for a file if I only part of the name « PHP Programming Language « IT news, forums, messages
Re: Searching for a file if I only part of the name

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация