Run PHP Code Inserted Into WordPress Posts and Pages

Run PHP Code Inserted Into WordPress Posts and Pages


Run PHP code inserted into WordPress posts and pages. First download, Install & activate given bellow plugin called Insert PHP

Read More Enable Justify Text Option In WordPress Post Editor

[button color="" size="" type="" target="" link="https://downloads.wordpress.org/plugin/insert-php.zip"]DOWNLOAD[/button]

You can use following PHP code between special tags:
[insert_php] instead of "<?php" and [/insert_php] instead of "?>"

The PHP code runs as the page is sent to the browser. Output of the PHP code is published directly onto the post or page where the PHP code between the special tags is located.

The code between the tags must be complete in and of itself. References to variables or code blocks outside the area between the tags will fail. See the “more information” URL for an explanation of this.

Examples of use:

  • Publish local time (users’ computer clock settings being unreliable).

  • Insert output of a PHP script, or just to run a script whether or not it generates output.

  • Check/manipulate cookies or other actions that JavaScript can accomplish when using JavaScript is undesirable.


<?php
print "PHP is Fun\n";
print "Hello world!\n";
print "I'm about to learn PHP!";
?>

this is a preview of above php script

[insert_php]

print "PHP is Fun!\n";
print "Hello world!\n";
print "I'm about to learn PHP!";
[/insert_php]

Read More Enable Justify Text Option In WordPress Post Editor

Comments

Popular posts from this blog

Remove Unused Media From WordPress

Download YouTube Videos Using TubeMate

How To Send Plain Text Mail Using PHP Mail Function