homepage Welcome to WebmasterWorld Guest from 54.211.80.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
Any Coldfusion Experts out there? I have a question
brucec




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

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

 

LifeinAsia




msg:4113015
 3:47 pm on Apr 9, 2010 (gmt 0)

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>

brucec




msg:4113017
 3:54 pm on Apr 9, 2010 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved