You are here: Re: Help - make PHP pull a File List (dir/ls/etc) in a specific directory - print results « All PHP « IT news, forums, messages
Re: Help - make PHP pull a File List (dir/ls/etc) in a specific directory - print results

Posted by Jim Michaels on 02/27/06 22:39

"David Haynes" <david.haynes2@sympatico.ca> wrote in message
news:PG5Mf.9897$2a4.2573@fe71.usenetserver.com...
> henshu wrote:
>> Complete n00b question yet again. Anyone know a way to make PHP pull a
>> "file list" (know as dir in windows, ls in *nix, etc) for a specific
>> directory, and have PHP print the results onto the page?
> http://www.php.net/manual/en/ref.dir.php
> Look at the opendir, readdir and closedir functions.

and don't forget if you want subdirectories too,
if (is_dir($filename) && $filename != "." && filename != "..") {
recurse($filename)
}

if you look at google newsgroups and search for these functions (not
recurse) you will find some code I wrote in comp.lang.php recently I think.

>
> -david-
>

 

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

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