From: Jeffrey K. <je...@np...> - 2011-01-19 22:01:25
|
My project is coming along very well but I've run into something else I cant seem to find in the docs. How do I get the URL of my current script (really what I want is the Url of its containing directory, but I can chop it off the end to get that) ? I've tried the CGI parameters $DOCUMENT_ROOT and $SCRIPT_NAME, but they both appear to be empty. Thanks JK |
From: Jamie C. <jca...@we...> - 2011-01-20 01:47:24
|
On 19/Jan/2011 14:01 Jeffrey Kesselman <je...@np...> wrote .. > My project is coming along very well but I've run into something else I cant > seem to find in the docs. > > How do I get the URL of my current script (really what I want is the Url of > its containing directory, but I can chop it off the end to get that) ? > > I've tried the CGI parameters $DOCUMENT_ROOT and $SCRIPT_NAME, but they both > appear to be empty. You can use $ENV{'HTTP_HOST'} to get the hostname in the URL, $ENV{'HTTPS'} to get the protcol (it will be "on" for https: , "off" or empty for http:) , and $ENV{'SCRIPT_NAME'} to get the /module/script.cgi path. - Jamie |
From: Jeffrey K. <je...@np...> - 2011-01-20 05:15:36
|
Thanks On Wed, Jan 19, 2011 at 8:47 PM, Jamie Cameron <jca...@we...> wrote: > On 19/Jan/2011 14:01 Jeffrey Kesselman <je...@np...> wrote .. > > My project is coming along very well but I've run into something else I > cant > > seem to find in the docs. > > > > How do I get the URL of my current script (really what I want is the Url > of > > its containing directory, but I can chop it off the end to get that) ? > > > > I've tried the CGI parameters $DOCUMENT_ROOT and $SCRIPT_NAME, but they > both > > appear to be empty. > > You can use $ENV{'HTTP_HOST'} to get the hostname in the URL, $ENV{'HTTPS'} > to > get the protcol (it will be "on" for https: , "off" or empty for http:) , > and $ENV{'SCRIPT_NAME'} to get the /module/script.cgi path. > > - Jamie > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > - > Forwarded by the Webmin development list at web...@we... > To remove yourself from this list, go to > http://lists.sourceforge.net/lists/listinfo/webadmin-devel > |