Name

GetProfileString — New as of ColdFusion 4.01

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:\cfusion\bin\cf40e.ini">
<CFSET MySection = "Program">
<CFSET MyEntry = "Company">

<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 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.