Skip to main content

mbr_include_once

Usage

This shortcode includes the content of the file specified but the file can only be included once.

It provides the same functionality as the regular PHP include_once functionality but as a shortcode.

Parameters

ParametersDescription
fileThe file name with it's file system path. The file system path can be specified as either the full path from the system root or the relative path from the document root.
Default: none.
Required: yes.

Validity

This shortcode is evaluated for any type of visitor.

Conditional Branching

This shortcode does NOT support conditional branching with [ELSE_include_once].

Nesting

Shortcode nesting within is NOT supported.

Examples

Includes the content of the file /full/path/to/my/file.php if it has not already been included elsewhere.

[mbr_include_once file='/full/path/to/my/file.php']

API

Note

There is no ActiveMember360 API function equivalent for this shortcode. Please use the PHP function include_once.