Skip to content

Embedding

Prasath Mani edited this page Jan 1, 2020 · 1 revision

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';
Clone this wiki locally