Name

GetProfileString

Synopsis

                  
                  
                  GetProfileString(inipath, section, entry)

Returns entry from section of the initialization file specified in inipath. Initialization files are used to set operating system and application-specific variables during system boot or application launch. Initialization files can be identified by their .ini file extension. Here’s an example that returns a profile string from one of ColdFusion’s initialization files:

<cfset MyPath = "c:\winnt\odbc.ini">
<cfset MySection = "cfsnippets">
<cfset MyEntry = "driver32">
   
<cfoutput>
<b>Path:</b> #MyPath#<br>
<b>Section:</b> #MySection#<br>
<b>Entry:</b> #MyEntry#<br>
<p><b>Profile String:</b> #GetProfileString(MyPath, MySection, MyEntry)#
</cfoutput>

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.