[GH-ISSUE #383] Unable to pass root_path and root_url from another php page #283

Closed
opened 2026-03-02 15:57:29 +03:00 by kerem · 6 comments
Owner

Originally created by @dasguptaritwik18 on GitHub (Jun 23, 2020).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/383

I want to pass root_path and root_url from another php page as session variable or post method. I have to define root_path depending on various conditions on another php page. Based on the conditions, I define root_path and want to pass the root_path to tinyfilemanager so that only this path gets opened in tinyfilemanager on a button click. Please help me in passing the root_path as a parameter from another php page.

Originally created by @dasguptaritwik18 on GitHub (Jun 23, 2020). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/383 I want to pass root_path and root_url from another php page as session variable or post method. I have to define root_path depending on various conditions on another php page. Based on the conditions, I define root_path and want to pass the root_path to tinyfilemanager so that only this path gets opened in tinyfilemanager on a button click. Please help me in passing the root_path as a parameter from another php page.
kerem 2026-03-02 15:57:29 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@prasathmani commented on GitHub (Jun 23, 2020):

try to Embed the file manager instead of passing values https://github.com/prasathmani/tinyfilemanager/wiki/Embedding.
Post method will not work because file manager will reload every folder/file navigation.

<!-- gh-comment-id:648170222 --> @prasathmani commented on GitHub (Jun 23, 2020): try to Embed the file manager instead of passing values https://github.com/prasathmani/tinyfilemanager/wiki/Embedding. Post method will not work because file manager will reload every folder/file navigation.
Author
Owner

@dasguptaritwik18 commented on GitHub (Jun 23, 2020):

Adding
define(FM_ROOT_PATH,"my_custom_path")
define(FM_ROOT_URL ,"my_custom_url")
will it lead me to the directory I want as root directory?

<!-- gh-comment-id:648175519 --> @dasguptaritwik18 commented on GitHub (Jun 23, 2020): Adding define(FM_ROOT_PATH,"my_custom_path") define(FM_ROOT_URL ,"my_custom_url") will it lead me to the directory I want as root directory?
Author
Owner

@prasathmani commented on GitHub (Jun 23, 2020):

yes, you can customize.

<!-- gh-comment-id:648177947 --> @prasathmani commented on GitHub (Jun 23, 2020): yes, you can customize.
Author
Owner

@dasguptaritwik18 commented on GitHub (Jun 24, 2020):

Thanks. Worked like a charm. Just another query, Is there any config settings that can make it readonly which I can pass through session?

<!-- gh-comment-id:648835346 --> @dasguptaritwik18 commented on GitHub (Jun 24, 2020): Thanks. Worked like a charm. Just another query, Is there any config settings that can make it readonly which I can pass through session?
Author
Owner

@prasathmani commented on GitHub (Jun 25, 2020):

define('FM_READONLY', true);
<!-- gh-comment-id:649160684 --> @prasathmani commented on GitHub (Jun 25, 2020): ```php define('FM_READONLY', true); ```
Author
Owner

@dasguptaritwik18 commented on GitHub (Jun 25, 2020):

Great!! Thanks to you. Helped a lot.

<!-- gh-comment-id:649539233 --> @dasguptaritwik18 commented on GitHub (Jun 25, 2020): Great!! Thanks to you. Helped a lot.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#283
No description provided.