A lightweight, zero-configuration PHP directory lister with a modern interface. Just drop index.php into any directory on a PHP-enabled serverβit works immediately with no setup required.
<img width="842" height="942" alt="image" src="https://github.com/user-attachments/assets/a88b8572-6204-4d8b-9e4d-effaa9b9cf37" />
- β Zero configuration β works immediately - π Directory navigation with breadcrumbs and pagination - βοΈ Multi-select β batch download or delete multiple files - π Security-hardened β protects against path traversal and code execution - π¨ 5 themes β Purple, Blue, Green, Dark, Light (user-switchable) - πΌ File previews β hover to preview images/videos - π΅ Built-in players β play audio and video files in-browser - π€ File upload β drag-and-drop or button upload (optional) - βοΈ File management β rename, delete, create folders (optional) - π¦ ZIP downloads β download directories as ZIP files - π± Responsive design β works on desktop, tablet, and mobile - β‘ Single file β no external dependencies except Font Awesome CDN
Requirements: - PHP 7.0+ (7.4+ recommended) - Web server with PHP support - Optional: ZipArchive extension for ZIP downloads
Installation:
1. Download index.php from releases
2. Copy it into the directory you want to list
3. Visit the directory in your browser
That's it! The file list renders automatically.
All settings are in the CONFIGURATION section at the top of index.php (lines 18-60). Open the file in a text editor to customize:
Display Settings:
$title = "Simple PHP File Lister";
$subtitle = "The Easy Way To List Files";
$footer = "Made with β€οΈ by Blind Trevor";Feature Toggles:
$enableRename = false; // Rename files/folders
$enableDelete = false; // Delete files/folders
$enableUpload = true; // Upload files
$enableCreateDirectory = true; // Create folders
$enableDownloadAll = true; // "Download All as ZIP" button
$enableIndividualDownload = true; // Individual file downloadsThemes:
$defaultTheme = 'purple'; // purple, blue, green, dark, light
$allowThemeChange = true; // Let users change themesPagination:
$defaultPaginationAmount = 30; // Items per page (5, 10, 20, 30, 50, 'all')
$enablePaginationAmountSelector = true; // Show pagination dropdownUpload Settings:
$uploadMaxFileSize = 10 1024 1024; // Max file size (10 MB)
$uploadMaxTotalSize = 50 1024 1024; // Max batch size (50 MB)
$uploadAllowedExtensions = []; // [] = all except blockedAdvanced:
$includeHiddenFiles = false; // Show hidden files (starting with .)
$zipCompressionLevel = 6; // ZIP compression (0-9)
$showFileSize = true; // Display file sizes
$showFolderFileCount = true; // Display folder/file countsBlocked Extensions:
Edit the BLOCKED_EXTENSIONS constant to control which file types are hidden and blocked from download/upload (e.g., .php, .exe, .sh).
SimplePhpFileLister prioritizes security:
- Path Traversal Protection β Uses realpath() validation, prevents ../ attacks
- Code Execution Prevention β Blocks dangerous file extensions (.php, .exe, .sh, etc.)
- Input Sanitization β All user inputs escaped with htmlspecialchars()
- Security Headers β CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy
- Hidden Files β Automatically excluded from listings (starting with .)
- Secure Downloads β Content-Disposition headers, MIME type whitelisting
- No Database β Single auditable file reduces attack surface
Multi-Select: - Select multiple files/folders with checkboxes - Batch download as ZIP or batch delete - Displays selection count and total size
File Upload: - Drag-and-drop files anywhere on the page - Multi-file upload with progress feedback - Automatic duplicate handling - Size limits and file type restrictions
Media Players: - Audio β MP3, WAV, OGG, M4A, FLAC, AAC - Visual progress bars for audio playback - <img width="335" height="301" alt="image" src="https://github.com/user-attachments/assets/678d1780-d6c2-4f3b-8592-26929d982d91" /> - Video β MP4, WebM, OGV (fullscreen lightbox) - Hover over files to reveal play buttons - <img width="814" height="510" alt="image" src="https://github.com/user-attachments/assets/b470f8b5-122c-42ee-917e-1f9d3da9ae47" />
File Management: - Rename files/folders (configurable) - Delete files/folders (configurable, permanent) - Create new folders (configurable) - All operations include path validation and security checks
5 built-in themes available: - Purple (default) β Vibrant purple-magenta gradient - Blue β Fresh cyan-blue gradient - Green β Natural teal-green gradient - Dark β Sleek dark mode - Light β Minimal light theme
Users can switch themes via the floating palette icon (when $allowThemeChange = true). Preferences are saved in browser localStorage.
<img width="521" height="679" alt="image" src="https://github.com/user-attachments/assets/6ef3275f-e373-4b5f-b239-72b1d36c0d19" />
- No built-in authenticationβuse web server auth (.htaccess, HTTP Basic Auth)
- Hover previews work on desktop only (disabled on touch devices)
- Delete operations are permanentβno trash/recycle bin
- Upload requires proper PHP configuration (upload_max_filesize, post_max_size)
- Version info displayed in footer (auto-updated by GitHub Actions)
This project uses automated semantic versioning:
- Version location: APP_VERSION constant in index.php and footer
- Auto-increment: PATCH version bumped on each merge to main
- Manual updates: Edit APP_VERSION for MAJOR/MINOR changes
- Releases: Auto-created on releases page
- Skip versioning: Include [skip-version] in commit message
To update to a newer version:
1. Download new index.php from releases
2. Replace existing file
3. Re-apply your configuration settings (document them first!)
Free to use, modify, and redistribute.
---
Simple PHP File Lister β’ Β© Andrew Samuel 2026