Hi. I’m very noob.
The page flamencopeko.net/lyrics.php will only show some filetypes like .jpg and .ico, but not .txt for instance.
This is the code:
[php]
<?php // open directory $myDirectory = opendir("lyrics"); // get entries while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // close directory closedir($myDirectory); // count elements in array $indexCount = count($dirArray); // show number of songs print("\n");
Print ("$indexCount songs in table \n"); print(" |
\n"); // sort files sort($dirArray); // print files print("
title | type | size |
---|---|---|
$dirArray[$index] | "); print(""); print(filetype($dirArray[$index])); print(" | "); print(""); print(filesize($dirArray[$index])); print(" | "); print("
[/php]
MC Peko