= 0; $dotpos-- ) if ( substr( $file, $dotpos, 1) == "." ) break; // now dotpos shows where the dot is $extension = substr( $file, $dotpos+1 ); if ( in_array( strtolower($extension), $hide_list ) ) return false; return true; } if ( !isset($_REQUEST['d']) ) $dir = $base_dir; else $dir = $base_dir . $_REQUEST['d'] . "/"; if ( !is_dir($dir) ) die("bad directory $dir"); $dirlist = array(); $filelist = array(); // get all files in initial directory $dh = opendir( $dir ); while ( ( $file = readdir( $dh ) ) !== false ) { if ( is_dir( $dir . $file ) && substr( $file, 0, 1) != "." ) $dirlist[] = $dir . $file; if ( ok_file($dir.$file) ) $filelist[] = $file; } closedir($dh); $rootfiles = "\n"; // now get subdirs $bigout = ""; foreach ( $dirlist as $dd ) { $bigout .= "Index of $dd
\n
"; } ?> d.minuslab.net :: file browser Index of: