mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-03-01 09:40:45 +01:00
Created Embedding (markdown)
19
Embedding.md
Normal file
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';
|
||||
```
|
||||
Reference in New Issue
Block a user