CFLib.org – Common Function Library Project

ReturnWebRootTranslated()

Last updated May 9, 2003

author

David Whiterod

Version: 1 | Requires: CF5 | Library: UtilityLib

Description:
Returns the translated (file system) location of the web root directory. Relies on PATH_TRANSLATED and SCRIPT_NAME

Return Values:
Returns a string.

Example:

<cfset Variables.WebRootDir = ReturnWebRootTranslated()>

<cfoutput>#Variables.WebRootDir#</cfoutput>

Parameters:

No arguments.

Full UDF Source:

/**
 * Returns the translated (file system) location of the web root directory.
 * 
 * @return Returns a string. 
 * @author David Whiterod (whiterod.david@saugov.sa.gov.au) 
 * @version 1, May 9, 2003 
 */
function ReturnWebRootTranslated() {
  var tmpPath = Replace(CGI.SCRIPT_NAME, "/", "\", "ALL");
  return ReplaceNoCase(CGI.PATH_TRANSLATED, tmpPath, "", "ALL");
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson