General
Executing PHP Code In WordPress Posts
January 20, 2010
0

Here are some plug-ins that enables execution of PHP code within a WordPress post (I am using WordPress 2).

For these to work, it’s best to use the HTML editor when editing posts, not the Visual editor.  I also find that toggling ftom HTML to Visual editor causes lost in the php code.

Note:
You are risking broken website and lost data by exposing the ability to run php, so please be very careful don’t allow just any users to use them, as the feature could be used to execute destructive or malicious code.

Example:

Using Exec PHP:

<?php echo "Hello Exec PHP";?>

Using PHPExec:

<phpexec>
<?php echo "Hello PHPExec";?>
</phpexec>