Link to home
Start Free TrialLog in
Avatar of eriklee
eriklee

asked on

ENV variables question

i have this perl script which checks out a couple of ENV type variables .. why is it that 'SCRIPT_FILENAME' keeps coming back as blank/undefined?

server_name and scriptname is returning fine.

Running Perl5 on NT4 IIS.
------------------------
#!/usr/local/bin/perl

print "Content-type: text/html\n\n";
print "<html><head></head><body>\n";
print "Your path is working and pointing to Perl version:<p>\n";
print "<B>$]</B><p>\n";
print "The complete path to this script is:<p>\n";
print "<font color=red><B>$ENV{'SCRIPT_FILENAME'}</B></font><p>\n";
print "The relative URL of this script (used in forms) is:<p>\n";
print "<B>$ENV{'SCRIPT_NAME'}</B>\n";
print "Your server returns the following domain name for your site:<p>\n";
print "<B>$ENV{'SERVER_NAME'}</b><p>\n";
print "</body></html>\n";

exit;
Avatar of Kim Ryan
Kim Ryan
Flag of Australia image

Try $ENV{'SCRIPT_NAME'}
Avatar of eriklee
eriklee

ASKER

erh..actually that one  is already in the script. what won't work is SCRIPT_FILENAME.
SCRIPT_FILENAME is not one of the CGI session variables. What data are you hoping to see in SCRIPT_FILENAME? See
http://stein.cshl.org/WWW/software/CGI/#environment
ASKER CERTIFIED SOLUTION
Avatar of jhurst
jhurst

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eriklee

ASKER

thanks