Re: Re: [PHP] files

2001-05-23 Thread Jon Yaggie

What i need is the function that allows me to read the files in the directory.  This 
is what i can'g find.  To be honest I am lazy and was hoping there may be a secret 
function out there like filetime() that worked on the whole directory.  but all i 
really need is what function will read the contains of the direcotry?

Jon



RE: Re: [PHP] files

2001-05-23 Thread Rudolf Visagie

Hi

function GetFiles ($DataPath, $files, $nfiles) {

// Reads a directory and puts filenames into a sorted array
$handle=opendir($DataPath);
if ($handle) {
$nfiles = -1;
while (false!==($file = readdir($handle))) {
if ($file != .  $file != ..) {
$nfiles++;
$files[$nfiles] = $file;
}
}
sort($files);
closedir($handle);
}
return 0;
}

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2001 04:55
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] files


What i need is the function that allows me to read the files in the
directory.  This is what i can'g find.  To be honest I am lazy and was
hoping there may be a secret function out there like filetime() that worked
on the whole directory.  but all i really need is what function will read
the contains of the direcotry?

Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]