Available for: Content Management Server, Template Engine
Task: Returns the contents of the specified text file.
Syntax:
loadTextFile filename [charset]
Function parameters:
-
filenameis the name of the file. -
charsetis the character encoding name of the file to read. This parameter is optional. The default value isutf-8. Enterencoding namesin the Tcl shell to retrieve the list of known character encodings.
Return value if successful: the contents of the file
Necessary permissions (CM only): no restrictions
Example:
CM>set a [loadTextFile /tmp/textfile iso8859-1]