Contact Form Processing Products - for all your needs

FormMail • Form Encryption • Hosted Forms

TEMPLATEDIR Setting

This page documents the TEMPLATEDIR configuration setting in FormMail.

Type Of Setting

TEMPLATEDIR is an OPTIONAL setting, which means...

OPTIONAL : you can change this setting if you need to, but the default value is fine for most circumstances.

Précis

Sets the directory/folder for template files.

Description

Set TEMPLATEDIR to the directory/folder on your server where template files are stored.

If you want to specify "good_template", "bad_template", "HTMLTemplate" or "PlainTemplate" in your forms, the templates must be found in the directory/folder you specify with this configuration setting (or the alternative setting TEMPLATEURL). This is a necessary step to prevent security problems. For example, without this measure, an attacker might be able to gain access to any file on your server.

We recommend you set aside a particular directory on your server for all your templates.

NOTE: on Windows servers, use '/' instead of '\' or double the '\', like this:

"d:\\path\\to\\templates"

or

"d:/path/to/templates"

Note that the actual template file path name is created by appending a '/' and the file name you provide in the form (with good_template, bad_template, HTMLTemplate, or PlainTemplate) to the TEMPLATEDIR setting. But, for security reasons, any path components preceding the file name are stripped. For example, with

<input type="hidden" name="good_template" value="path/to/ok.htm" />

the good_template value is stripped down to:

ok.htm

before being appended to TEMPLATEDIR.

Default Value

$TEMPLATEDIR = "";

Examples

$TEMPLATEDIR = "/home/mysite/public_html/templates";

See Also

 
Close