Skip to content

Replace hardcoded configuration path '/config.php' with CONFIG_FILE#674

Open
maestrow wants to merge 2 commits intoprasathmani:masterfrom
maestrow:embed-with-variative-config
Open

Replace hardcoded configuration path '/config.php' with CONFIG_FILE#674
maestrow wants to merge 2 commits intoprasathmani:masterfrom
maestrow:embed-with-variative-config

Conversation

@maestrow
Copy link
Copy Markdown

Replace hardcoded configuration path '/config.php' with CONFIG_FILE named constant. Thus you can embed file manager with different configs.

  define('FM_EMBED', true);
  define('CONFIG_FILE', __DIR__.'/config1.php');  // this value can depends on some state
  print(CONFIG_FILE);
  define('FM_SELF_URL', $_SERVER['PHP_SELF']);
  require './tinyfilemanager.php';

This PR made possible #444 feature request: "allow user to access multiple directories". Use this scenario: For each target directory define a link which lead to it's own page with embedded file manager instance, having its own CONFIG_FILE. Common configuration options can be included from shared file.

…amed constant. Thus you can embed file manager with different configs.
@fjmdevs
Copy link
Copy Markdown

fjmdevs commented Feb 22, 2022

Disregard my accidental click 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants