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 Principal Software Developer Digital Healthcare Solutions Tel. +27(0)11 266 6946 Fax. +27(0)11 266 5080 Cell: +27(0)82 895 1598 E-mail: [EMAIL PROTECTED] -----Original Message----- From: Kevin Garrett [mailto:[EMAIL PROTECTED]] Sent: 12 November 2001 03:08 To: [EMAIL PROTECTED] Subject: [PHP] Using PHP for directory indexing Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory & create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] -- 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]