loadVariables
void session.loadVariables ( String fileToReadFrom ) (enterprise edition only)
Description
Load session variables from a file.
Parameters
- fileToReadFrom File path of the file that contains the session variables, as a string.
Return Values
Returns void. If there is a problem retrieving the file contents an I/O error will be written to the log.
Change Log
Version | Description |
---|---|
4.5 | Available for enterprise edition. |
See also: saveVariables.
If you want to create your own file of session variables, the format is a hard return-delimited list of name/value pairs. Both the key and value should be URL-encoded.
Examples
Load Session Variables from File
// Reads in variables from the file located at "C:\myvars.txt".
// Note that a forward slash is used instead of a back slash
// as a folder delimiter. If back slashes were used, they
// would need to be doubled so that they're properly escaped
// out for the script interpreter.
session.loadVariables( "C:/myvars.txt" );
// Note that a forward slash is used instead of a back slash
// as a folder delimiter. If back slashes were used, they
// would need to be doubled so that they're properly escaped
// out for the script interpreter.
session.loadVariables( "C:/myvars.txt" );
Sample Variables File
BIRTHDAY=12%2F25
NAME=Santa
AGE=Unknown
NAME=Santa
AGE=Unknown
See Also
- saveVariables() [session] - Saves the session variables to a file
scraper on 07/16/2010 at 4:54 pm
- Printer-friendly version
- Login or register to post comments