<!DOCTYPE html> <html
lang="de"> <head> <meta charset="UTF-8">
<title>Dateien</title> <style> body
{ font-family: sans-serif; margin: 40px; } ul {
list-style-type: none; padding:
0; } li { margin: 10px 0; } a { text-decoration: none; color: #0066cc; } a:hover { text-decoration:
underline; } </style> </head>
<body> <h1>Verzeichnisinhalt</h1>
<ul> <?php $dir =
'.'; // Aktuelles Verzeichnis der Subdomain if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { // Versteckte Dateien, Ordner und die index.php selbst ausschließen if
($file != '.' && $file != '..' && $file != 'index.php' &&
substr($file, 0, 1) != '.') { echo "<li><a
href='$file'>$file</a></li>"; } } closedir($dh); } ?> </ul> </body> </html>