- PHP 5
- Apache mod_rewrite
- Easy to install and use
- Easy to customize
- Very fast
- Very low memory usage
- Valid XHTML
- SEO optimized
Put the content of public/ directory in a public location on your server and the content of library/ outside the public folder.
Example: /home/PhpIndexLight/library/ PhpIndex/ /home/public_html/PhpIndexLight/ css/ images/ index.php .htaccess
Create the location where the browsable files will be put. If possible, put this location OUTSIDE the public folder.
/home/_files/ 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.
Upload files/directories to the directory you created on previous step using FTP (or other method of your choice).
Test the installation by opening the location where you installed the script in your browser.
To configure PhpIndex Light you just need to edit config.php file.
$config = array( /** * Base directory path (full path), must end with / * Type: string * Default: dirname(__FILE__) . '/_files/' */ 'base_directory' => dirname(__FILE__) . '/_files/', /** * Web path to PhpIndex root directory * Type: string * Default: 'http://localhost/PhpIndex/' */ 'root_path' => 'http://localhost/PhpIndexLight/public/' );
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 Light was installed. You can test the location in your browser to make sure it is correct.
See the PhpIndex Light demo page.
To view all of the available class methods take a look at the API reference.