HSP Instructions

Axigen Documentation

Five different types of instructions are available in HSP:

  • IF - ELSE Statement

The IF-ELSE statement in HSP has the following syntax:

  • FOR Statement

The FOR loop increments a counter from a start index to a stop index. It is used to execute a block of instructions a number of times. It can also be used to iterate through a range of elements of an ARRAY. It has the following syntax:

  • FOREACH Statement

The FOREACH statement is mainly used to iterate through the elements of an ARRAY or through the properties of a MAP. It has the following syntax:

  • BREAK Statement

  • INCLUDE Statement

The INCLUDE statement is used to insert another HSP source in a HSP file. It has the following syntax:

Here, PARAM represents the path of the HSP file that will be inserted in the current HSP. This path is relative to the value of the "path" parameter configured for WebMail (in the axigen.cfg configuration file). HSP files from another folder can be inserted only in the private zone.

Also, keep in mind the following limitations/rules:

1. The HTTP server rejects paths like "*/../*".

2. The inclusion depth for paths is limited to 16.

3. Any HSP file MUST have .hsp extension.