Created Embedding (markdown)

Prasath Mani
2020-01-01 18:33:26 +05:30
parent aa6c39a4f1
commit e817de13b1

19
Embedding.md Normal file

@@ -0,0 +1,19 @@
Include file manager in another script. Just define FM_EMBED and other necessary constants.
```php
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
```php
define('FM_EMBED', true);
define('FM_SELF_URL', $_SERVER['PHP_SELF']);
require 'path/tinyfilemanager.php';
```