<?php
// Простой минималистичный вариант
$directory = '.';
$files = array_diff(scandir($directory), ['.', '..', 'index.php']);

echo '<!DOCTYPE html>
<html>
<head>
    <title>Файлы сайта</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 40px; background: #f5f5f5; }
        .file-list { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
        .file-item { padding: 10px; border-bottom: 1px solid #eee; display: flex; align-items: center; }
        .file-item:last-child { border-bottom: none; }
        .file-item:hover { background: #f8f9fa; }
        .file-icon { margin-right: 10px; font-size: 1.2em; }
        .directory { font-weight: bold; color: #e74c3c; }
        a { text-decoration: none; color: #3498db; }
        a:hover { color: #2980b9; text-decoration: underline; }
    </style>
</head>
<body>
    <div class="file-list">
        <h2>📁 Файлы в корневой директории</h2>';

foreach ($files as $file) {
    $isDir = is_dir($file);
    $icon = $isDir ? '📁' : '📄';
    $class = $isDir ? 'directory' : '';
    
    echo "<div class='file-item $class'>
            <span class='file-icon'>$icon</span>
            <span>" . ($isDir ? $file . '/' : "<a href='$file'>$file</a>") . "</span>
          </div>";
}

echo '</div></body></html>';
?>