www.webdeveloper.com
Results 1 to 3 of 3

Thread: base directory help

  1. #1
    Join Date
    Jan 2003
    Posts
    1

    base directory help

    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

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    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 [/].

  3. #3
    Join Date
    Jan 2003
    Location
    Aurora, Illinois
    Posts
    7
    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>";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles