I have a utility class that’s being used inside a bunch of different
…rhtml files. Is there some sort of global variable that I can use to
figure out exactly what URL is being served? I’m thinking of something
like $PHP_SELF in PHP.
From: Francis Hwang [mailto:sera@fhwang.net]
Sent: Thursday, August 15, 2002 5:56 PM
To: ruby-talk ML
Subject: How do I find the URL of the .rhtml that’s being served?
I have a utility class that’s being used inside a bunch of different
…rhtml files. Is there some sort of global variable that I can use to
figure out exactly what URL is being served? I’m thinking of something
like $PHP_SELF in PHP.
The server should report this as an environment variable:
try adding $ENV.inspect in your script and look for PATH_INFO,
PATH_TRANSLATED, QUERY_STRING and SCRIPT_NAME
-billy.
···
On Fri, Aug 16, 2002 at 09:55:46AM +0900, Francis Hwang wrote:
I have a utility class that’s being used inside a bunch of different
…rhtml files. Is there some sort of global variable that I can use to
figure out exactly what URL is being served? I’m thinking of something
like $PHP_SELF in PHP.
The server should report this as an environment variable:
try adding $ENV.inspect in your script and look for PATH INFO,
PATH TRANSLATED, QUERY STRING and SCRIPT NAME
I tried Googling around for references of $ENV.inspect, but I didn’t
find anything that made sense to me. (Couldn’t find it in the Pickaxe
book either.) Could you be more specific about how I should do this?
The server should report this as an environment variable:
try adding $ENV.inspect in your script and look for PATH INFO,
PATH TRANSLATED, QUERY STRING and SCRIPT NAME
I tried Googling around for references of $ENV.inspect, but I didn’t
find anything that made sense to me. (Couldn’t find it in the Pickaxe
book either.) Could you be more specific about how I should do this?
I tried Googling around for references of $ENV.inspect, but I didn’t
find anything that made sense to me. (Couldn’t find it in the Pickaxe
book either.) Could you be more specific about how I should do this?
This will display all of the enviroment variables available to the CGI
process: