
yapp
User
Oct 3, 2001, 2:26 AM
Post #3 of 4
(10124 views)
|
He, this works aswell. (got it from the YaBB forum code) After this code, your original code should work perfectly.
BEGIN { $THIS_PATH = 'path'; if($ENV{'SERVER_SOFTWARE'} =~ /IIS/) { push @INC, $THIS_PATH; chdir($THIS_PATH); } } The current directory in IIS appears to be the WWW-root all the time. I found that out when using the Cwd module. The $THIS_PATH could also be determinied by examining $0. Do this the way you like, either with a regexp, or with substr() and index(). This helped me out of much trouble in IIS, and makes the script platform-independant.
|