Sprawling file index written in PHP
  • PHP 84.6%
  • Shell 15.4%
Find a file
2026-02-19 22:20:24 +01:00
.gitignore gitignore cleanup 2026-02-19 22:20:24 +01:00
create_symlinks_in_subdirs.sh first commit 2026-02-19 12:11:07 +01:00
example.png Add example.png 2026-02-19 22:10:20 +01:00
index.php Add example.png 2026-02-19 22:10:20 +01:00
LICENSE first commit 2026-02-19 12:11:07 +01:00
README.md Add example.png to readme 2026-02-19 22:12:15 +01:00

fileindexer

Minimal, single-file PHP directory index / file browser intended to be dropped into a folder tree and served by a normal web server (Apache/nginx + PHP-FPM). It renders:

  • A folder list (links to subfolders)
  • A file list with human-readable sizes

The app is implemented in index.php. The helper script create_symlinks_in_subdirs.sh can create index.php symlinks in all subfolders so navigation works without special rewrite rules.

Screenshot

Example screenshot

Requirements

  • PHP (tested with typical PHP 7/8 installs; no extensions beyond standard filesystem functions)
  • A web server that can serve PHP (or the PHP built-in dev server for local testing)

Install

git clone ssh://git@git.disroot.org/drkt/fileindexer.git
cd fileindexer

If you want normal “click folder to enter it” navigation without any rewrite rules, create symlinks for index.php in subfolders:

chmod +x ./create_symlinks_in_subdirs.sh
./create_symlinks_in_subdirs.sh

Configuration

Theres no config file. Adjust index.php directly:

  • Blacklist: edit the $blacklist array to hide files/folders from the listing.
  • Root detection: if a file named .rootdir exists in the current directory, the UI shows an “About” link (to rd-about.html) instead of a “Return” link.

Minimal usage example

  1. Put index.php in a folder with files/subfolders.
  2. (Optional) run ./create_symlinks_in_subdirs.sh so subfolders also load the browser.
  3. Browse to the site, click folders to navigate, click files to download/view.
  4. Ideally create rd-about.html so that isn't a dead link.