Peter Kappus wrote:
Hey all,
Anyone move scripts between IIS and Apache or need to write scripts that work on both? The problem I'm facing is that IIS reports the current working directory (CWD) as the root dir of the "application" as defined in the IIS control panel while apache reports the CWD as the actual directory of the script file itself.
This is a problem when including other files/modules...
For example, to include "/myApp/func.pl" from "/myApp/index.pl":
require "func.pl"; #works fine in Apache but not IIS require "/myApp/func.pl"; #works for IIS
ditto for modules:
require "myMods::myModule.pm"; #works in Apache require "myApp::myMods::myModule.pm"; #works in IIS
aarrggh. I'd rather not add a big block like:
if(-e "func.pl"){ require "func.pl"; }else{ require "/myApp/func.pl"; }
at the top of every file and I don't even know if that would work...
Anybody got a more elegant solution? (other than "dump IIS" ;-)
Thanks! -Peter
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]