Jump to content

Archived

This topic is now archived and is closed to further replies.

classifieds100

root path to directory Help please

Recommended Posts

Hi,

I have a script in which I need to get these two values automatically:

# full root path to directory (ie: /www/data/docs/user.com/public)
$this->directory_root = ".";

# http path to directory (ie: [a href=\"http://user.com/public)\" target=\"_blank\"]http://user.com/public)[/a] (no trailing slash)
# Note: this must be a directory path you cannot use [a href=\"http://user.com/public/sitemap.php\" target=\"_blank\"]http://user.com/public/sitemap.php[/a]
$this->homepage = ".";

I have try to replace the first $this->directory_root = "."; with:
$this->directory_root = "$_SERVER['DOCUMENT_ROOT'] . dirname(__FILE__)";

But I'm sure I get it wrong somehow.

And the second part I also can't get it to work either.

See more here:

############################## CONFIGURATIONS #################################

# html page on/off toggle writing of html header and footer
$this->html = "on";

# width of <table>
$this->table_width = "100%";

# on/off
$this->debug = "off"; /* turn off/on display of working path. not recommened to leave
on during public use. */
# full root path to directory (ie: /www/data/docs/user.com/public)
$this->directory_root = ".";

# http path to directory (ie: [a href=\"http://user.com/public)\" target=\"_blank\"]http://user.com/public)[/a] (no trailing slash)
# Note: this must be a directory path you cannot use [a href=\"http://user.com/public/sitemap.php\" target=\"_blank\"]http://user.com/public/sitemap.php[/a]
$this->homepage = ".";

# http path to images
$this->img_src = "/images";

# alternating row color;
$this->alt_color = "on"; /* on/off */
$this->alt_color_one = "#f6f6f6";
$this->alt_color_two = "#c0c0c0";

# show directories first on/off
$this->order = "on";

# blacklist file names and directories so they will not show
$this->blacklist = Array(".",
"..",

.... rest of the code goes here....


Please can someone help me to get right these values

$this->directory_root = ".";
$this->homepage = ".";

automatically from the server?

Thanks in advance
James

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.