Scripts Index
PHP Internet Utilities  

PHP Shortcode

download download home home   report broken
important script information
company name:
Godfrey Chan
license: Free
minimum requirements: No special requirements.
functional limitations:
PHP Shortcode description
Based on kukukuan's Inline PHP, this plugin allows you to embed and run PHP code in posts, pages or widgets* with a WordPress shortcode.(* Requires a shortcode enabled widget plugin, such as Section Widget.)UsageThe plugin provides two pairs of shortcodes - [php]code[/php] and [echo]code[/echo]. these two pairs of shortcodes resembles the functionality of the and tags in a normal PHP script, respectively.For example:The answer to the ultimate math challenge, 1+2, is...[php] $a = 1; $b = 2; echo $a + $b;[/php]Will become:The answer to the ultimate math challenge, 1+2, is...3The [echo] tag will automatically print the returned value of the first expression. Therefore, [echo]some_function()[/echo] is essentially equivalent to [php]echo some_function()[/php].Some Important Notes** This plugin will change the priority of the do_shortcode filter. If you are experiencing any conflict with other shortcode plugins, please disable the plugin and report the problem in the forums. **Although I said the shortcode pairs resembles a tag pair, there is an important difference. The PHP code in the shortcodes are executed in a "throw-away" local namespace, instead of the global one. All variables defined in a [php] code [/php] block cannot be accessed outside the block. Therefore, this will not work:[php] $a = 1; $b = 2;[/php]The answer to the ultimate math challenge, 1+2, is... [echo]$a+$b[/echo]And neither would this:[php] $my_array = array('apple','orange'); foreach($my_array as $fruit):[/php]I like [echo]$fruit[/echo][php]endforeach;[/php]To work around the first problem, you may use the global keyword:[php] global $a, $b; $a = 1; $b = 2;[/php]The answer to the ultimate math challenge, 1+2, is... [php]global $a, $b; echo $a+$b[/php]And to work around the second problem, you may use "real" PHP closing tags within your [php] code [/php] block to switch between PHP and HTML mode:[php] $my_array = array('apple','orange'); foreach($my_array as $fruit):?>I like
Similar scripts
Info Box on New Post/Page Editor (Popularity: ) : Do you have multiple authors creating post/pages that you need to remind them of things while they are reminding. This plugin creates a little reminder box in the upper right corner of the Add Post and Add Page areas and ...
PHP-Ping (Popularity: ) : A simple program that you can host on your server to enable people to ping from your location to anywhere. Just one file.
Virtual Bangla Keyboard (Popularity: ) : This plugin will add a Virtual Bangla Keyboard in your post's comment form. It will help comment writers to write comments in bangla. The Virtual Keyboard layout is developed by Sabuj Kundu of Amader Projukti. Some java script code is ...
Qhub Wordpress Widget (Popularity: ) : This plugin enables you to include questions posted on your Qhub account within your Wordpress blog. Related posts are included as a customizable formatted list within your posts or as customisable widgets within your sidebar.More in-depth documentation can be viewed ...
Bbpress Latest Discussion (Popularity: ) : This plugin will generates Latest Discussion list from your bbpress forum into your wordpress. It has the ability to generate latest discussion on sidebar also.The administrator can also set the behavior for this plugin. Even if your bbpress is not ...
Search Engine Report Script 2.0 [PHP] (Popularity: ) : This is PHP Script to report about Google Pagerank, Alexa Ranking, List in Dmoz, Link Popularity in Google, Yahoo, MSN, AltaVista and All the web ,number of store page in Google and MSN. PLUS+ 2.0 Version You can enter your ...
Online Server Status (Popularity: ) : This script checks server status through any web browser. It is called through an IMG tag and can be used to check multiple pages, servers or domains. The script will display an active or disconnect image depending on the check.
Network Query Tool (Popularity: ) : Network Query Tool (NQT) is a one-stop solution for getting info about a domain or IP address. After supplying a hostname or IP, NQT will do the following: reverse lookup, DNS query (dig), whois (domain or IP owner), check port, ...
PHP Binder (Popularity: ) : This program provides a web-based interface to Bind 9.X. It allows individuals to make changes to their zone files without needing to know the intricacies of Bind. It also lets users manage their own DNS settings without having to bother ...
A1Monitor Network Monitor (TCP or Web) (Popularity: ) : Monitor multiple web or TCP servers. Receive notification by email or pager if any server can't be reached a number of times in a row. It can reboot your NT server or run a batch file or program for you.
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Similar Software
PHP Master Editor (Popularity: ) : PHP Master Editor is a tool for writing, editing, and debugging PHP scripts and HTML pages. It has internal browser, Code Explorer, a built-in FTP client, customizable Code Templates, etc. PHP Master Editor is deceptively simple, but it is really ...
PHP Expert Editor (Popularity: ) : PHP Expert Editor is an easy-to-use IDE for Windows with UTF-8 support. This editor supports Perl, Python, Ruby, Tcl, Java Script and other languages too. This Editor specially designed for PHP-masters and has a nice features for beginners and professional ...
Top PHP Studio (Popularity: ) : Top PHP Studio is an Integrated Development Environment for PHP, designed to
simplify the development process for PHP projects. Developers can easily edit
and test PHP scripts with Top PHP Studio. Top PHP Studio offers internal HTTP
server, internal browser, ...

MidiCart PHP Shopping Cart (Popularity: ) : MidiCart PHP Shopping Cart is a Try-Before-You-Buy Shopping Cart Software, that provides all you need to create, operate, and maintain a professional Internet shop. MidiCart PHP Shopping Cart is extremely easy to use, flexible, powerful and affordable e-commerce solution for ...
DzSoft PHP Editor (Popularity: ) : DzSoft PHP Editor is a handy and powerful tool for writing and testing PHP scripts and HTML/XML pages. Being designed specifically for PHP development, it has a friendly, but powerful interface that is comfortable both for beginners and experienced programmers. ...
PHP Processor (Popularity: ) : PHP Processor is designed to help you protect your intellectual property when distributing PHP source files. The other use for PHP Processor is to optimize PHP source code and considerably decrease size of your source code files. PHP Processor provides ...
SourceGuardian PHP Encoder (Popularity: ) : SourceGuardian for PHP is the ultimate protection solution for your PHP scripts.

Main feature list:

+ Full Bytecode Encryption - protect your files by removing the original PHP Source Code
+ Fully encode and deploy for PHP5 (and PHP4)
+ ...

Atrise PHP Script Debugger (Popularity: ) : Atrise PHP Script Debugger is a debug script for your PHP projects. It can help you to show PHP variables, debug string output, script execution time, the page source and other information that helps you in your PHP development.

Features:
* Handy ...

Scriptol Php Compiler (Popularity: ) : Scriptol is a modern, very powerful and easy to learn programming language. The minimal Scriptol program is just one line: print "hello", for example.
It is intended both to program applications, using Xul, Java or GTK for GUI, or scripts ...

MailBee WebMail Lite PHP (Popularity: ) : MailBee WebMail PHP is a free AJAX webmail application with skins support. Users can receive, view, manage, compose, and send email through web interface (POP3 and SMTP supported). Source code included.


ad


Rate me
supported os
Linux
Mac OSX
Macintosh
Win All, BSD, Solaris
stats
downloads 1
version 1.3
size in Kb 10
popularity   
534/372916
user rating 0/10
New Scripts
Popular Scripts
Latest Reviews