PhpIndex is a script used to list all files and directories from a location, allowing the users to access and download the files included with advanced SEO optimizations and security features.

Advanced features are also available: Captcha to prevent robots from downloading files, leech protect, logging and caching support and many more.

  1. Unzip the package contents on a temporary location.
  2. Put the content of public/ directory in a public location on your server and the content of library/ outside the public folder.


  3. Create the location where the browsable files will be put. If possible, put this location OUTSIDE the public folder.



    In order to use the upload function you need to configure the path to the upload folder (by default is in _files/upload/ - that path must exist and Apache must have appropriate writing permissions. To be sure you can CHMOD 777 _files/upload/.

    You can copy the directory _files/ included in the package to the desired location (you can rename it). It contains a .htaccess file which denies direct access to the directory even if it is put in a public location. This will prevent any unauthorized direct access to your files.

  4. Upload files/directories to the directory you created on previous step using FTP (or other method of your choice).
  5. Edit config.php (see Configuration).
  6. Test the installation by opening the location where you installed the script in your browser.


To configure PhpIndex you just need to edit config.php file.

Mandatory configuration:

     * Base directory path (full path), must end with /
     * Type: string
     * Default: dirname(dirname(__FILE__)) . '/_files/'
    'base_directory' => dirname(dirname(__FILE__)) . '/_files/',

     * Web path to PhpIndex root directory
     * Type: string
     * Default: 'http://localhost/PhpIndex/'
    'root_path' => 'http://localhost/PhpIndex/'

The base directory points to the location of the browsable files. This should be a full path for best results. dirname(__FILE__) is the directory where config.php is located. You must change this value accordingly to your setup. This directory must exist on the server.

The root path is the HTTP address for the location where PhpIndex was installed. You can test the location in your browser to make sure it is correct.

See the PhpIndex demo page.

To view all of the available class methods take a look at the API reference.

The light version is also available for free: PhpIndex Light.