Advertisement
murp

ColdFusion Domain Utility CFC

Feb 18th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. component  displayname="Host Utility" hint="I pull the url for the host" output="false"
  2. {
  3.  
  4.  
  5.     public string function getHost() {
  6.  
  7.         var urlString = '';
  8.  
  9.         if( cgi.server_port !=  80) {
  10.             urlString = 'http://' & cgi.server_name & ':' & cgi.server_port;
  11.         }
  12.         else {
  13.             urlString = 'http://' & cgi.server_name;
  14.         }
  15.  
  16.         return urlString;
  17.     }
  18.  
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement