Re: [PHP] List files in a dir

2004-02-27 Thread Raditha Dissanayake
Shaun wrote: Hi, is it possible to have a file that lists all of the files in the current so that users can download them - this would be useful for a collection of images I have? Thanks for your help it's only a few lines of code and you will find it here: http://www.raditha.com/php/dir.php

Re: [PHP] List files in a dir

2004-02-27 Thread Ryan A
> Hi, Hi, > is it possible to have a file that lists all of the files in the current > so > that users can download them Yes, belive it or not...it IS possible. - this would be useful for a collection of > images I have? Sure sounds like it. > Thanks for your help Most welcome. Incase the

RE: [PHP] List files in a dir

2004-02-27 Thread Chris W. Parker
Shaun on Friday, February 27, 2004 10:14 AM said: > is it possible to have a file that lists all of the files in the > current so that users can download them - this would be useful > for a collection of images I have? yes. look up the file system functions in the m

Re: [PHP] list files in a dictory and its subdirectories

2003-02-03 Thread Jason Sheets
An easy way would be to to convert your code to a function and use recursion with an is_dir conditional. Here is a quick example, there are also a few examples in the user notes at the PHP manual for opendir or readdir. function lsdir($dir) { if ($handle = opendir($dir)) {

Re: [PHP] List Files

2001-04-19 Thread Joe Stump
$foo = `ls help*`; $files = explode("\n",$foo); while(list(,$fname) = each($files)) echo $fname."\n"; --Joe On Thu, Apr 19, 2001 at 08:25:19AM -0400, [EMAIL PROTECTED] wrote: > Hi, > > Does anyone know how I can list all the files begining with help in one of my > pages. > > So I have a dir

RE: [PHP] List Files

2001-04-19 Thread Joe Sheble (Wizaerd)
exec( "ls -1 help*.*", $arFiles ); foreach( $arFiles as $cFile ) { print( $cFile ); } At 08:44 AM 4/19/01 -0400, Matthew Luchak wrote: >$path='/root/helpfiles/'; >$dir_handle = opendir($path); > > while ($file = readdir($dir_handle)) { >if ((ereg("help",$file)){ >INCLUDE "$path$fil

RE: [PHP] List Files

2001-04-19 Thread Matthew Luchak
$path='/root/helpfiles/'; $dir_handle = opendir($path); while ($file = readdir($dir_handle)) { if ((ereg("help",$file)){ INCLUDE "$path$file"; OR echo ''.$file.' } } Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -Original Message

RE: [PHP] list files in a diretory

2001-04-09 Thread Boget, Chris
> How can I list the files in a diretory? > Something like, get the files name in an array... http://www.php.net/manual/en/class.dir.php Chris