Recursive Directory Index

\n"; /* Walk through the current directory */ $i = 0; while( $dirEntries[$i] ) { /* Assign a short name */ $fileName = $dirname . "/" . $dirEntries[$i]; $fileNameShort = $dirEntries[$i]; if( is_dir( $fileName ) ) /* It is a directory structure */ { /* HTML, Open directory list item */ print "\t
- $fileNameShort/\n"; /* Recurse into subdirectory */ fncLinkDir( $fileName ); /* HTML, Close the directory list item */ print "
\n"; } else /* It is some type of file */ { /* HTML, Create a list item entry. */ print "\t
- $fileNameShort
\n"; } /* Increment the index else we loop forever, doh! */ $i ++; } /* HTML, Close the unordered list */ print "\n"; /* Wait, we're finished? */ }; $indexuri = explode("?", $REQUEST_URI); print "

# Index of ".urldecode($indexuri[0])."

\n"; fncLinkDir(".", $recurse, $REQUEST_URI, $DOCUMENT_ROOT); ?>

Recursive Directory Indexer/1.9.0, Copyright © 2000 David L. Norris.