This is a simple filemanager. It is a single file solution which uses HTML5, CSS3, JavaScript and PHP. It works like a client-server system where HTML5/CSS3/JavaScript is the client part and the PHP API acts as the server, which reduces the traffic significant.
The IFM uses the following resources:
- ACE Editor
- Bootstrap v3
- jQuery
- custom icon set generated with Fontello
Client | Server |
---|---|
HTML5 and CSS3 compatible browser | PHP >= 5.5 (only if using auth; if not PHP 5.4 works either) |
activated JavaScript | optional: cURL extention (for remote upload) |
Just copy the ifm.php to your webspace - thats all :)
- e - edit / extract current file
- hjkl - vim-style navigation
- g - focus path (goto)
- r - refresh file table
- u - upload a file
- o - remote upload a file
- a - show ajax request dialog
- F - new file
- D - new directory
- space - select a highlighted item
- del - delete selected files
The configuration is located at the top of the script in a separate configuration class. The options in the class are commented and named laconically. If you have questions anyway write me an email.
Meanwhile I added a super simple authentication feature using the configuration keys auth
and auth_source
. You can configure it like this:
"auth" => 1,
"auth_source" => 'inline;<username>:<password_hash>',
In the example above the user and password are declared inline. You can also use a file (which should lie out of the $DocumentRoot of the webserver):
"auth_source" => 'file;/path/to/file',
The file should contain ONLY ONE LINE:
<username>:<password_hash>
The password hash has to be a hash generated by PHPs password_hash()
function. The default credentials are "admin:admin".
Currently there are no known issues. If you find any flaws please let me know.
The IFM was developed with the assumption that the highest level of operation is the scripts base location. So it is neither possible to nagivate nor to use any API function in a level above the script root.
It is highly recommended to restrict access to the script e.g. using a basic authentication.