Index  |  Related pages  |  Classes  |  Objects  |  Functions  |  Entities  |  Function Sets

Functions

htmlEscape()

Escapes a string converting HTML special characters.

htmlEscape( string, [output] )
string

The string to be converted.

output

A stream where to place the output.

Returns:

A converted string, or nil if writing to a string.

This function converts special HTML characters to HTML sequences:

If an output stream is specified, then the output is sent there instead being returned in a new string. If the output of this function must be sent directly to output, a true value can be passed to send data directly to the VM output stream (usually linked with web server data stream). This will spare memory and CPU.

startedAt()

Returns the value of seconds() when the script was started.

startedAt( )
Returns:

A numeric value that can be used to check script performance.

This function returns a relative time taken when the web server integration system gives control to Falcon, before that the script is actually loaded and started.

This formula:

       elapsed = seconds() - startedAt()

gives the time elapsed in processing the script up to that line, including the time to setup the VM and start the execution.

tempFile()

Creates a temporary file.

tempFile( [name] )
name

If given and passed by reference, it will receive the complete file name.

Returns:

A Falcon stream.

Raises:
IoError

on open or write error.

Temporary streams are automatically deleted when the the script terminates.

In case the script want to get the name of the file where the temporary data is stored (i.e. to copy or move it elsewhere after having completed the updates), the parameter name needs to be passed by reference, and it will receive the filename.

Note: The temporary files are stored in the directory specified by the parameter UploadDir in the falcon.ini file.

uriEscape()

Escapes a string converting it into URI convention.

uriEscape( string )
string

The string to be converted.

Returns:

A converted string.

This function converts the characters so that the input string can then be appended to URI requests.

uriUnescape()

Unescapes a string converting it from URI convention.

uriUnescape( string )
string

The string to be converted.

Returns:

A converted string.

Raises:
ParseError

if the string is not correctly encoded as an URI string.

See also uriEscape.


Index  |  Related pages  |  Classes  |  Objects  |  Functions  |  Entities  |  Function Sets
Made with Faldoc 1.0.0