0 ) $sz = 'KMGT'; return sprintf( "%.{$decimals}f", $bytes / pow( 1024, $factor ) ) . @$sz[$factor - 1] . 'B'; } // get the file list for the current directory $files = scandir( '.' ); // files to exclude from the files array. $exclude = array( '.', '..', '.DS_Store', 'index.php', '.git', '.gitmodules', '.gitignore', 'node_modules' ); // search files array and remove anything in the exclude array foreach ( $exclude as $ex ) { if ( ( $key = array_search( $ex, $files ) ) !== false ) { unset( $files[$key] ); } } // title bar and tiny stylesheet with all the icons encoded in it. ?><?php print str_replace( '/', ' / ', title() ); ?>
" . str_replace( '/', ' / ', title() ) . ""; // if the array of files isn't empty if ( !empty( $files ) ) { // open unordered list tag print ""; } else { // display empty directory message print "

This folder contains no files.

"; } ?>