FREE DOWNLOAD · SINGLE-FILE PHP DIRECTORY LISTER
PHPDL v2.2.1
A simple way to share a folder of files.
Drop one index.php into a directory and PHPDL turns its contents into a neatly formatted listing, with file-type icons, file sizes, modification ages, and download links. No database, installation wizard, or separate asset files.
Originally created by Greg Johnson as PHPDL v2.0. Updated by Mike Davis to keep this useful little program working on modern PHP, while preserving its original appearance and single-file design.
Browse sample documents, open PDFs, download a ZIP, and try the Parent Directory link. All demo files are intentionally public.
What’s improved over v2.0?
- Modern PHP compatibility: tested on PHP 8.5.12. The sorting function uses
array_multisort()directly instead of building PHP code witheval(), and handles optional sorting settings. - Cleaner directory handling: missing file-extension values no longer produce the warnings encountered with subdirectories.
- Consistent summaries: file count and total size display even when a directory has no subfolders. The summary covers the current directory, not its descendants.
- Automatic upward navigation: a Parent Directory link appears when the immediate parent contains a recognized PHPDL
index.phpcontaining the generic signature. It stops at an unrelated website or a directory without PHPDL. - Hidden-file filtering (v2.2.1): dotfiles and dot-directories, including
.htaccess, are excluded from public directory listings. This does not replace server-side access controls. - Same familiar design: the original listing, icons, direct file links, download buttons, and author credit are retained.
Install it in three steps
- Download and extract the ZIP to get
index.php. - Upload the file into each directory you want to list. If that directory already has an
index.php, preserve it first; replacing it changes what that URL serves. - Visit the directory in your browser. That’s it.
For example, put a copy in /downloads/ and another in /downloads/manuals/. The Manuals listing will offer a link back to Downloads. Downloads will not offer a parent link unless its own parent also runs a compatible PHPDL version.
Use the same master file everywhere. There are no root settings, marker files, first-run questions, or self-modifying setup code. Each directory needs its own copy.
Requirements & practical notes
- A web server with PHP; this release has been tested on PHP 8.5.12. It still uses PHP short tags, so
short_open_tagmust be enabled. - The web server needs permission to read the files and traverse the directories. Typical permissions are
644for files and755for directories. - PHPDL must be selected as the directory’s default document. If a different index page takes precedence, adjust the server’s DirectoryIndex configuration.
- The parent script is read as text for its signature, never executed for detection. An unreadable parent file means no parent link.
- PHPDL is a public file listing, not an access-control system. Parent-link detection does not restrict direct access to other URLs.
- The original Flash-based media players are legacy features and do not work in modern browsers. This update does not modernize those players or claim comprehensive security hardening.
Version History
- v2.2.1 (November 2026): Hides dotfiles and dot-directories from public listings, including
.htaccess. Uses the generic PHPDL signature shared with the corrected v2.2 release. - v2.2 (November 2026): Modern PHP compatibility improvements, safer sorting without
eval(), corrected directory summaries, and automatic parent navigation. Download archived v2.2 ZIP.
Verify either release using the SHA-256 checksums.
Credits & license
PHPDL v2.2.1 modified by Mike Davis.
Originally created by Greg Johnson.
Distributed under the original Creative Commons Attribution-ShareAlike 3.0 United States license. You may share and adapt it under those terms: retain attribution, indicate changes, and distribute adaptations under the same license. This is an independent continuation, not an endorsement by the original author.