davidnewcomb / freephp_plugin

B2evolution Free PHP widget

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FreePHP plugin

FreePHP is a B2evolution widget that allows you to embed custom PHP code in a page widget. Think FreeHTML but with PHP!

Supported versions

Currently tested and working under B2evolution 6.9, however it may work with earlier versions.

Installation

  1. Go to the plugins directory of your b2evolution installation.
  2. Clone this repo: git clone https://github.com/davidnewcomb/freephp_plugin.git
  3. In the backoffice, System > Plugins > Install new.
  4. Find 'Free PHP' and click '[Install]'
  5. Once installed you can add a widget to your container as normal.

Usage

The plugin uses eval() to run the PHP. See [[https://secure.php.net/manual/en/function.eval.php]] for information on handling PHP's opening and closing tags.

Examples

Just PHP:

echo 'Hello World';

Mix finishing in non-PHP code:

echo 'Hello';?> World

Mix finishing in PHP code:

?>Hello <?php echo 'World';

Warning

In the wrong hands this plugin can be a very dangerous security issue. However, if you are a developer on a closed system and you want to test some code before you create a plugin then it is really handy.

About

B2evolution Free PHP widget

License:MIT License


Languages

Language:PHP 100.0%