467,113 Members | 1,392 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,113 developers. It's quick & easy.

Path problem

rajiv07
100+
Hi to all,

I am running a perl script under Windows 2003 IIS 6.0 server.In my script i try to read a html file.For that i have use the relative path

my $file="../templates/myfile.html";

But it says the file is not exist,which is existing.But when i use absolute path
(my $file="C:/Inetpub//cgi-bin/elearning/templates/myfile.html";) its working fine.

my wondering is that how do i do that path setting.

Thanks
Rajiv
Jun 23 '08 #1
  • viewed: 1048
Share:
3 Replies
numberwhun
Expert Mod 2GB
I am not sure I follow what you are asking. Can you elaborate? Also, what directory are you launching the html file from?

Regards,

Jeff
Jun 23 '08 #2
rajiv07
100+
I got the solution.The problem is the working directory is c:/inutpub/cgi-bin/ but the perl scripts are in c:/inutpub/cgi-bin/elearning/query/ so if i call '../templates/myfile.html' it check in c:/inutpub/templates/myfile.html which is not there.so it simply gives error.
we can findout the working directory using getpwd() function


Regards
Rajiv
Jun 24 '08 #3
numberwhun
Expert Mod 2GB
I got the solution.The problem is the working directory is c:/inutpub/cgi-bin/ but the perl scripts are in c:/inutpub/cgi-bin/elearning/query/ so if i call '../templates/myfile.html' it check in c:/inutpub/templates/myfile.html which is not there.so it simply gives error.
we can findout the working directory using getpwd() function


Regards
Rajiv
Glad you worked it out.

Regards,

Jeff
Jun 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

12 posts views Thread by Xah Lee | last post: by
10 posts views Thread by wo_shi_big_stomach | last post: by
5 posts views Thread by =?Utf-8?B?SmVmZiBCZWVt?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.