Starting Directory

I’m actually trying to get the File Explorer demo working on my site. The issue I’m having is with the tree view starting directory. I can’t get my starting directory working for the life of me. I don’t understand how to just get a simple web/root directory listed rather than a drive letter like how it is shown in the demo (c:/Program Files).

Let’s say I just want to get a folder named “files” contents listed. And this is located in the same directory as the config.php file.

Should one of these work? These don’t work for me.
$gl_starting_directory = “/files”;
or
$gl_starting_directory = realpath(“/files);
or
$gl_starting_directory = $_SERVER[“DOCUMENT_ROOT”].”/files";

What can fix this???

The questions is more about php functions, not about our components. $gl_starting_directory should be an absolute path to the required folder. Therefore, the second or the thrid approach may work .

I don’t understand how to just get a simple web/root directory listed

Possibly as follows:
$gl_starting_directory = $_SERVER[“DOCUMENT_ROOT”];