Chapter 2: ColdFusion Functions
513
SetProfileString
Sets the value of a profile entry in an initialization file. This function returns an empty
string if the operation succeeds or an error message if the operation fails.
See also
GetProfileString
.
Syntax
SetProfileString
(
iniPath, section, entry, value)
iniPath
Fully qualified path (drive, directory, filename, and extension) of the initialization
file.
section
The section of the initialization file in which the entry is to be set.
entry
The name of the entry that is to be set.
value
The value to which to set the entry.
Example
<!---This example uses SetProfileString to set the
timeout value in an initialization file. --->
<HTML>
<HEAD>
<TITLE>SetProfileString Example</TITLE>
</HEAD>
<body bgcolor="#FFFFD5">
<H3>SetProfileString Example</H3>
This example uses SetProfileString to set the value of timeout in an
initialization file. Enter the full path of your initialization file,
specify the timeout value, and submit the form.
<!--- This section of code checks to see if the form was submitted.
If the form was submitted, this section sets the initialization
path and timeout value to the path and timeout value specified
in the form --->
<CFIF Isdefined("Form.Submit")>
<CFSET IniPath = FORM.iniPath>
<CFSET Section = "boot loader">
<CFSET MyTimeout = FORM.MyTimeout>
<CFSET timeout = GetProfileString(IniPath, Section, "timeout")>
<CFIF timeout Is Not MyTimeout>
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...