| Code: |
|
<html> <head> <title>Downloads</title> </head> <body bgcolor="#000000"> <table align="center" width="90%" cellpadding="3" cellspacing="2" border="0"> <tr> <td align="center"> <?php // Verzeichnis in dem die Dateien liegen (relative Pfadangabe zum Script, mit "/" am Ende!) $download_folder = "./downloads/"; // in das o.g. Verzeichnis wechseln chdir($download_folder); $folder = opendir('.'); while( $files = readdir($folder) ) { //$total_files = count($bilder); if( $files != "." && $files != ".." && !is_dir($files) ) { //$downloads .= "$file\n"; //$total_files = count($files); $total_files = array($files); reset($total_files); echo "<table align=\"center\" width=\"100%\" cellpadding=\"5\" cellspacing=\"3\" border=\"0\">"; echo "<tr>"; while ( list($key, $downloads) = each($total_files) ) { // Download-Pfad $filename = "$downloads <br>"; $path = $download_folder . $downloads; echo "<td align=\"left\">"; echo "<a style=\"color: #999999\"; href=\"$path\">$filename</a>"; echo "</td>"; echo "</tr>"; echo "</table>"; } } } closedir($folder); chdir("../"); ?> </tr> </table> </body> </html> |