Welcome to WebmasterWorld Guest from 54.145.209.34

Forum Moderators: brotherhood of lan & mack

Any Coldfusion Experts out there? I have a question

   
3:31 pm on Apr 9, 2010 (gmt 0)

10+ Year Member



I am a PHP programmer and have taken on a web site thatuses ColdFusion. I know, this is not a current language, but the client still has it on his web site.

I have one question: How do I access the URL that is in the web browser? I researched this on the web and find too many answers that do not work.

I want put it into a variable with <CFSET>, but just need the code to access the URL.

Thanks.
Bruce
3:47 pm on Apr 9, 2010 (gmt 0)

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



this is not a current language

I (and thousands of other CF coders) certainly take exception to that! But I may decide to help anyway. :)

Not exactly sure what you mean by "the URL that is in the web browser." For example, if the current page is http://www.example.com/somepage.cfm
The following variables would be available to you:
CGI.Server_Name = www.examples.com
CGI.Script_Name = /somepage.cfm

So to set the variable ThisServerName, you would use:
<cfset ThisServerName = CGI.Server_Name>
3:54 pm on Apr 9, 2010 (gmt 0)

10+ Year Member



Thanks, LifeinAsia. Sorry about that. It was not meant to be offensive, but you (on behalf of thousands of other CF coders) confirmed that I am wrong. LOL

Thanks for your help!

Bruce
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month