PHP - What it is and how is it used?
- PHP (Hypertext Preprocessor, sometimes referred to as Personal Home Page).
- Created by Rasmus Lerdorf in 1995 as a set of useful scripts it is a general purpose scripting language - can be used to develop dynamic web applications or to programme desktop software.
- Is Open Source Software meaning that it is open for everyone to use and find/fix and improve the underlying code.
- Is now a highly successful Community Project, spearheaded by Zend Technologies.
- It's an easy to use and learn language making it popular amongst beginner and professional developers as their is lots of documentation, free scripts and help communities available on the web.
- PHP is embedded into HTML documents, your web page(s) don't have to to contain actual PHP code. You may use it where and when you want, for example you might use it to display text, using the (echo) command or perhaps to power an online form processing module.
- All PHP documents must end with the extension (.php) - this tells your web sever that all documents must be processed by the PHP Processor - Once a PHP document is called, the web server will first process the code and the output will be returned to the screen as in normal HTM.
The Structure of a PHP Document
The below sets the structure of a simple PHP Code below to emebed within your HTML file - remember to save your files as(.php)
In order to start a php script you open a block of PHP code like this:
<?php // PHP code here ?>
To end your PHP code lines you need to use the terminator sign (;)
We are extremely pleased with the services and pre-sales advice of A.N.A Web Hosting. A.N.A Web Hosting provide a reliable, powerful, flexible, secure, efficient business web-hosting service combined with excellent after-sales service. Their staff are knowledgeable, helpful and we thoroughly recommend them.