RE: Re: [PHP] files

From: Date: Wed, 23 May 2001 13:53:23 +0000
Subject: RE: Re: [PHP] files
Groups: php.general 
Request: Send a blank email to php-general+get-54057@lists.php.net to get a copy of this message
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 rudolf@qedi.co.za -----Original Message----- From: Jon Yaggie [mailto:dmsales@design-monster.com] Sent: 23 May 2001 04:55 To: php-general@lists.php.net 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

« previous php.general (#54057) next »