perl2010 has asked for the wisdom of the Perl Monks concerning the following question:
/cgi-bin/ /data/ /htdocs/ (this is the webroot)I have a script in /cgi-bin/chat/big_chat.pl That does a require of "utility2.pl" so it is in that same folder. Now big_chat.pl also needs to edit 2 files in 2 other folders
/data/text/chat.txt /htdocs/cowboys/chat.txtso big_chat.pl is setup like this
Is that the correct way to do relative paths if you are working with a cgi-bin above the webroot?#!/usr/bin/perl require 'utility2.pl'; &form_handler; $textdir = "../../data/text"; $docfile = "../../htdocs/cowboys/$FORM{'3'}"; #...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to make relative URL if "cgi-bin" is above the web root?
by merlyn (Sage) on Jan 19, 2010 at 23:23 UTC | |
by perl2010 (Initiate) on Jan 20, 2010 at 14:36 UTC | |
|
Re: How to make relative URL if "cgi-bin" is above the web root?
by merlyn (Sage) on Jan 20, 2010 at 21:27 UTC | |
|
Re: How to make relative URL if "cgi-bin" is above the web root?
by lostjimmy (Chaplain) on Jan 20, 2010 at 14:49 UTC |