August 2003
Intermediate to advanced
1140 pages
68h 45m
English
SetProfileString
SetProfileString(inipath, section, entry, value)Sets the value of a profile string
entry in
section of the initialization file
specified by inipath. If
section does not exist, ColdFusion creates
it first. If the operation is successful, an empty string is
returned. If not, an exception is thrown. Here’s an
example that changes the number of threads used by the Verity K2
server in the k2server.ini file:
<cfset MyPath = "c:\cfusionmx\lib\k2server.ini"> <cfset MySection = "Server"> <cfset MyEntry = "numThreads"> <cfset MyValue = "6"> <cfset MyProfileString = SetProfileString(MyPath, MySection, MyEntry, MyValue)> <cfoutput> <b>Path:</b> #MyPath#<br> <b>Section:</b> #MySection#<br> <b>Entry:</b> #MyEntry#<br> <p><b>Profile String:</b> #MyValue# </cfoutput>