mbr_exec
Usage
This shortcode allows the addition of PHP code into a post, page, excerpt or widget.
This shortcode uses the PHP eval() language construct/function. The eval() language construct can cause security issues because it allows execution of arbitrary PHP code.
Use with caution. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.
Parameters
None.
This shortcode doesn’t require parameters but expects PHP code without <?php and ?> to be placed between the start and end tags.
Do not use PHP comments inside this shortcode.
Validity
This shortcode is evaluated for any type of visitor.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_exec].
Nesting
Shortcode nesting within is NOT supported.
Examples
- Example 1
- Example 2
Returns the value of the PHP variable $c.
[mbr_exec]
$a = 3;
$b = 5;
$c = $a + $b;
echo $c;
[/mbr_exec]
Includes the content of the file named my_php_script.
[mbr_exec]
include($my_path . 'my_php_script');
[/mbr_exec]
API
There is currently no ActiveMember360 API function equivalent for this shortcode.