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 DownloadThis 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.
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.
This is the fastest way to beginners to start using Tiny File Browser
(e.g. http://yoursite/any_path/tinyfilemanager.php)
.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
);
$auth_users
before use.
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
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)
);
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'
);
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'
);
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'
);
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
Configure language, Error Reporting and Show Hidden Files on settings page
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