Gossamer Forum
Home : General : Perl Programming :

?Directory Paths

Quote Reply
?Directory Paths
need help with directory path in .cgi script please-

When I log into my server with my ftp client i see this,it has like /server/server2/myacct. I will call this directory:
/dir/dir/dir

my cgi-bin is:
/dir/dir/dir/cgi-bin

my public dir is:
/dir/dir/dir/html

I have a .cgi:
/dir/dir/dir/cgi-bin/abc.cgi

In the .cgi I call a file:
/dir/dir/dir/html/123.html

in the .cgi, what would the path to the 123.html file be?
how do i specify paths to files in different directories if they are not in a subdirectory?

thanks :]
Quote Reply
Re: ?Directory Paths In reply to
Well, it depends on what you want to do...You really should gain a better understanding of ABSOLUTE and VIRTUAL paths.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: ?Directory Paths In reply to
If you want to use a virtual path, you could use
"../html/123.html"
as your path
the ".." directory is in every directory and is a link back to its parent directory.
so if you were in the "/dir/dir/dir/cgi-bin" directory and you typed
cd ../
you would be in the "/dir/dir/dir" directory.
Hope this helps
-- Gordon --



------------------
$blah='82:84:70:77';
print chr($_) foreach (split/:/,$blah);

Quote Reply
Re: ?Directory Paths In reply to
that is it.
the virtual path.
Thank you much!