Tiny File Manager

Web based File Manager in PHP, Manage your files efficiently and easily with Tiny File Manager

It is web based file manager and it is a simple, fast and small file manager with a single file, multi-language ready web application for storing, editing and managing files and folders online via web browser. The Application runs on PHP 5.5+, a build-in support for managing text files with cloud9 IDE and it supports syntax highlighting for over 150+ languages and over 35+ themes. .

Home   GitHub   Demo   Download

Introduction


This documentation is to help you regarding each step of Installation. Please go through the documentation carefully to understand how this is made and how to configure this properly. Basic PHP knowledge is required to customize this Application. You may learn basics here.

Requirements

It is a simple, fast and small file manager with single php file. It is also a web code editor. It'll run either online or locally, on Linux, Windows or Mac based platforms. The only requirement is to have PHP 5.5+ available.

  1. PHP 5.5.0 or higher.
  2. Zip extension for zip and unzip actions.
  3. Fileinfo, iconv and mbstring extensions are strongly recommended.
Be careful while editing the file manager. If not edited properly, the application may break completely.
No support is provided for faulty customization. check issues or create new one here

Getting Started #back to top

This is the fastest way to beginners to start using Tiny File Browser

  1. Download ZIP with latest version from master branch.
  2. Copy tinyfilemanager.php to your website folder and open it with web browser (e.g. http://yoursite/any_path/tinyfilemanager.php).

User Management#back to top

You only need to open it and use the following credentials (you should change them!)
Admin user: admin/admin@123
Normal user: user/12345


// Users: array('Username' => 'Password', 'Username2' => 'Password2', ...)
$auth_users = array(
    'admin' => '$2y$10$axZWlisI..n9xmULN4gbhectUdOpu0z64xb9ysycHQ5ubKYcEY5sW', //admin
    'user' => '$2y$10$.mwmDmZH2003EjFobn86QuU3kr6NAmUYAaMVWQdLXYkirie7EJxj6', //12345
    'guest' => '$2y$10$a.DMI5sRjAnvhb.8rFAXY.XPSEO/eatVb4qCMmTc2YcxTDKp9xMyC' //guest
);

                                

To enable/disable authentication set $auth_users to true or false.


// Auth with login/password (set true/false to enable/disable it)
$use_auth = true; //change to false to disable the authentication

                    


Password

Generate secure password using PHP password_hash() password generator


$auth_users = array(
    'username' => 'REPLACE YOUR GENERATED PASSWORD HERE'
);

                       

If not able to generate password or facing any issue, than generate password using tinyfilemanager itsef on tinyfilemanager > settings > Generate new password hash or alternative password generator here

or you can use directly password hash in tinyfilemanager it self


$auth_users = array(
    'username' => password_hash('password here', PASSWORD_DEFAULT)
);

                       

Readonly users

Set user role as readonly permission and thay don't have permission to create, edit, delete and upload files


// Readonly users (usernames array)
$readonly_users = array(
    'user',
    'user1',
    'guest'
);

                       

User Specific Directories

Assign specific directories to each user


//array('Username' => 'Directory path', 'Username2' => 'Directory path', ...)
$directories_users = array(
    'admin' => 'root',
    'user' => 'root/user-folder',
    'guest' => 'root/guest/temp'
);

                        

Exclude Files & Folders #back to top

Configured files and folders will be excluded from the listing, incase same file/folder in multiple place also excluded


//Array of files and folders excluded from listing
$exclude_items = array(
    'my-folder',
    'secret-files',
    'tinyfilemanger.php',
    '*.php',
    '*.js'
);

Embedding #back to top

Include file manager in another script. Just define FM_EMBED and other necessary constants.


class SomeController
{
    public function actionIndex()
    {
        define('FM_EMBED', true);
        define('FM_SELF_URL', UrlHelper::currentUrl()); // must be set if URL to manager not equal PHP_SELF
        require 'path/to/tinyfilemanager.php';
    }
}

OR

define('FM_EMBED', true);
define('FM_SELF_URL', $_SERVER['PHP_SELF']);
require 'path/tinyfilemanager.php';

Embeding tiny file manager with bootstrap 4, Demo here

Tiny File Manager Embed with Bootstrap

Settings #back to top

Configure language, Error Reporting and Show Hidden Files on settings page

Tiny File manager Settings

Config Flags #back to top

  • FM_ROOT_PATH - default is $_SERVER['DOCUMENT_ROOT']
  • FM_ROOT_URL - default is 'http(s)://site.domain/'
  • FM_SELF_URL - default is 'http(s)://site.domain/' . $_SERVER['PHP_SELF']
  • FM_ICONV_INPUT_ENC - default is 'CP1251'
  • FM_USE_HIGHLIGHTJS - default is true; Enable/Disable the code highlight
  • FM_HIGHLIGHTJS_STYLE - default is 'vs'
  • FM_DATETIME_FORMAT - default is 'd.m.y H:i'
  • FM_EXTENSION - default is ""; Configure allowed file extensions to upload .i.e: 'jpg,png,pdf,gif,html,css,js'
  • show_hidden_files - default is false; Show or hide files and folders that starts with a dot
  • $edit_files - default is true; Enable ace.js (https://ace.c9.io/) on view's page
  • $sticky_navbar - default is true; Enable/Disable fixed navigation top bar
  • $online_viewer - default is true; Google Docs Viewer to view all kinds of office file formats