cgi-bin question

I am a new programmer to do cgi/ perl
Should my cgi and perl must be placed in cgi-bin

how to point to the right directory, if all related sub-directory in the same level
main_dir -----cgi-bin
         ----- images
         ----- html
If some path , such as  .\.\ abc.gif  is not workable in linux and unix, but workable in NT.
How to point to the right directory in Linux or unix ?

chinamotionAsked:
Who is Participating?
 
christopher sagayamConnect With a Mentor Commented:
./ goes to the upper level
0
 
christopher sagayamCommented:
use always / for path info

normally cgi scripts can be placed in any directory
0
 
chinamotionAuthor Commented:
Sorry, I make some error in my question.

The actual question info is that:
If some path , such as  ././images/ abc.gif  is not workable in linux and unix, but workable in NT.


How to point to the right directory in Linux or unix for upper, upper level?
if cgi-bin,images and html sub-directory in the same level.
0
 
KennyIT Application ExecutiveCommented:
In Unix/Linux, it is ../ to go to the upper level. (e.g ../cgi-bin/script.pl).

NOT ./
0
 
BigRatCommented:
zxv250 is correct ./ means "from here", wherever "here" is!

If you are using Apache look at the directives in the conf file (there is a lot of comment explaining how it works) and also consider using rewrite rules. I do the latter to implement a virtual file store.

0
All Courses

From novice to tech pro — start learning today.