View Single Post
Old 07-26-2005, 05:38 PM   #2 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 36
Default

The path to you script is held in the environment variable SCRIPT_FILENAME. Here is a short script that will display all the variables. You can save the code as enpath.pl and put it in your cgi-bin, this is how you call it. From your browser type: http://www.yourdomain.com/cgi-bin/enpath.pl

PHP Code:
#!/usr/bin/perl

use CGI;

$co = new CGI;

print
    
$co->header,
    
$co->start_html('CGI Environment Variables Example'),
    
$co->center($co->h1('CGI Evironment Variables Example'));

foreach 
$key (sort keys %ENV) {

    print 
$co->b("$key=>$ENV{$key}"),
    
$co->br;
}

print 
$co->end-html

This should help you get the correct path..
sandman is offline   Reply With Quote
Sponsored Links