Whatever message this page gives is out now! Go check it out!
getPropertyFile(String filePath, String encoding)Parameter | Required | Type | Description |
filePath | Yes | String | The absolute path of the properties file. |
encoding | No | String | The encoding of the properties file. The default is UTF-8. If not specified, picks the default encoding. |
<cfscript>
path =GetDirectoryFromPath(GetCurrentTemplatePath()) & "config.properties"
properties=getPropertyFile(path);
writeDump(properties)
</cfscript><cfscript>
//incorrect enconding format
try {
path = GetDirectoryFromPath(GetCurrentTemplatePath()) & "config.properties";
property1 = getPropertyFile(path,"ISO-8859-1121");
writeDump(property1)
}
catch (any e) {
writeOutput(e.message);
}
</cfscript>