Click to See Complete Forum and Search --> : base directory help


axelheat000
01-26-2003, 05:37 PM
i am trying to set up a news publisher newsboard and cant figure out my base directory

if my adresss is
http://sportsotalk.netfirms.net

and my newsboard directory is
http://sportsotalk.netfirms.net/cgi-bin/newsboard


what would my base dir be

jeffmott
01-26-2003, 06:49 PM
The base dir is the path on the server itself, and you'll have to get it from them. It's usually something like /home, /www, or similar to that. Some servers you can get away with just a slash [/].

Mr Cgi Guy
01-30-2003, 06:56 PM
Here's a quick bit that will display your servers env. vars.
The var. named DOCUMENT_ROOT is your
base directory...
or... SCRIPT_FILENAME, which is the path right on up to the file...

Just copy this and save it into a blank text file and save it as envvars.cgi or something like that...

----------------------------------------
#!/usr/bin/perl

print "Content-type:text/html\n\n";

print <<HTML;
<body>
EndOfHTML

print "<table cellspacing=0 cellpadding=0 border=1>";
print "<th>Env Variable</th><th>Value</th>";

foreach $key (sort(keys %ENV)) {
print "<tr><td>$key</td><td>$ENV{$key}</td></tr>\n";
}


print "</table>";
print "</body></html>";