A self-contained, single-file PHP directory browser with built-in theme support.
- Single file — just drop
index.phpinto any directory - Directory browsing — navigate into sub-folders with breadcrumb navigation
- Sortable columns — sort by name, date modified, or file size (ascending/descending)
- 6 built-in themes — Dark, Light, Dracula, Nord, Solarized, Gruvbox
- Theme persistence — selection saved via cookie
- Responsive design — works on mobile, tablet, and desktop
- File-type icons — emoji-based icons for folders, images, audio, video, code, archives, documents, and more
- File extension badges — inline badges showing file type at a glance
- Secure path handling —
realpath()validation prevents directory traversal attacks - No dependencies — no database, no composer packages, no JavaScript frameworks
- Copy
index.phpinto any directory served by Apache/Nginx with PHP:
cp index.php /var/www/html/my-files/- Visit the directory in your browser. That's it.
All options are at the top of index.php:
| Option | Default | Description |
|---|---|---|
$browseDirectories |
true |
Allow navigating into sub-folders |
$title |
'Index of {{path}}' |
Page title ({{path}}, {{files}}, {{size}} are template vars) |
$subtitle |
'{{files}} objects...' |
Subtitle below the title (empty string to disable) |
$breadcrumbs |
true |
Clickable path segments in the title |
$showDirectories |
true |
Show folders in the listing |
$showDirectoriesFirst |
true |
Folders appear before files when sorting by name |
$showHiddenFiles |
false |
Show dotfiles (.htaccess, etc.) |
$showIcons |
true |
Show file-type emoji icons |
$dateFormat |
'd/m/y H:i' |
PHP date() format string |
$defaultTheme |
'dark' |
Initial theme: dark, light, dracula, nord, solarized, gruvbox |
$ignore |
['index.php'] |
Files/folders to hide from the listing |
$alignment |
'center' |
Page alignment: 'center' or 'left' |
Switch themes from the dropdown in the top-right corner. The selection is saved in a cookie.
| Theme | Description |
|---|---|
| Dark | Default dark gray theme |
| Light | Clean white/gray |
| Dracula | Purple, cyan, and pink |
| Nord | Cool blue-gray arctic palette |
| Solarized | Classic solarized dark |
| Gruvbox | Warm retro brown and amber |
Add a new entry to the $themes array in index.php:
'mytheme' => [
'label' => 'My Theme',
'bg' => '#000000',
'card-bg' => '#111111',
'text' => '#eeeeee',
'text-muted' => '#888888',
'heading' => '#ffffff',
'link' => '#ff6600',
'link-hover' => '#ff9900',
'row-hover' => '#222222',
'border' => '#333333',
'header-border' => '#444444',
'footer' => '#555555',
'badge-bg' => '#222222',
'badge-text' => '#ff6600',
'select-bg' => '#222222',
'select-text' => '#eeeeee',
],- PHP 8.0+
- A web server (Apache, Nginx, etc.)
MIT