% ########## # fileselector_top.htm - displays the file names # top frame for file selection # TJM 05/17/01 # $Id$ # params # $dir, $excludedirs # going into a directory not yet supported ########## #require "prepend.php3"; ############## # Function DirArray($dir,$excludedirs=0) # Returns an array of files in a directory # copied into this script because of include problems # modified to exclude subdirs # todo - file type filter ############## Function DirArray($dir,$excludedirs=0) { $loops = 0; $d = dir("$dir"); while($entry=$d->read()) { if (substr($entry,0,1)<>'.') { if (!$excludedirs) { $files[$loops++]=$entry; } else { if (!is_dir($entry)) { $files[$loops++]=$entry; } } } } $d->close(); $files[$loops++]=' '; asort($files); return $files; } %>
Directory of <% echo $dir %>| $val |