![MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Скачать руководство пользователя страница 369](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-cfml-language/coldfusion-4-5-cfml-language_reference_3287257369.webp)
Chapter 2: ColdFusion Functions
345
ExpandPath
Returns a path equivalent to the relative_path appended to the base template path.
Note the following:
•
ExpandPath creates a platform-appropriate path. You can use either a slash (/)
or a back slash (\) in the specified relative path.
•
The return value contains a trailing slash (or back slash) if the specified relative
path contains a trailing slash (or back slash).
See also
FileExists
,
GetCurrentTemplatePath
, and
GetFileFromPath
.
Syntax
ExpandPath
(
relative_path)
relative_path
Any relative path. ExpandPath converts relative directory references (.\ and ..\)to
an absolute path. The function throws an error if this argument or the resulting
absolute path is invalid.
Examples
<!--- This example shows the use of ExpandPath --->
<HTML>
<HEAD>
<TITLE>
ExpandPath Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>ExpandPath Example</H3>
<CFSET thisPath= ExpandPath("*.*")>
<CFSET thisDirectory= GetDirectoryFromPath(thisPath)>
<CFOUTPUT>
The current directory is: #GetDirectoryFromPath(thisPath)#
<CFIF IsDefined("FORM.yourFile")>
<CFIF FORM.yourFile is not "">
<CFSET yourFile = FORM.yourFile>
<CFIF FileExists(ExpandPath(yourfile))>
<P>Your file exists in this directory. You entered
the correct file name, #GetFileFromPath("#thisPath#/#yourfile#")#
<CFELSE>
<P>Your file was not found in this directory:
...
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...