Basic PHP Tutorial
PHP is the Hypertext Preprocessor extensively used Open Source general-purpose scripting language which is particularly appropriate for Web development and can be used in HTML. The PHP syntax is based on C, Java, and Perl and is easily learnable. With the help of PHP, web developers can swiftly write webpages that are generated dynamically and so much more.
As PHP runs on major operating systems as like Unix and Windows servers, it is easily available. PHP also supports most of the web servers. In case of most of the servers, the PHP contains a module while for others supporting CGI standard, it works as a CGI processor.
Instead of encoding a program using a number of commands for the output of HTML, you can add the PHP code to the HTML script using start and end tags allowing to get in and out of the PHP mode.
PHP can be separated from client-side JavaScript as the PHP codes are executed on the server itself. The web server can also be configured in order to process the HTML documents using PHP.
Though PHP is very simple, it contains several advanced features, which are useful for professional programming.
The PHP codes are mainly used in three fields-
Server-side scripting- it is the most conventional & basically the focal target field for PHP. To make it work, the three necessary things are the PHP parser (CGI or server module), a web server and a web browser. The web server has to be run along with a connected PHP installation. The PHP program output can be accessed with a web browser ad view the PHP page through the server.
Command line scripting- here the PHP script can be run without a server or browser, only the PHP parser has to use it in this process. This kind of usage is best in case of scripts that are regularly executed using cron or Task Scheduler.
Writing client-side GUI applications- Though PHP may not be the language for writing windowing applications, the PHP-GTK can still be used for writing such programs. Therefore, you can also write cross-platform applications. The PHP-GTK is an extension of PHP.
Due to PHP, you have the liberty of selecting any operating system as well as web server. You can also choose whether to use procedural programming or object oriented programming, or a combination of both. Even though every standard OOP feature is not realized in the present PHP version, several of the code libraries and big applications are written with the help of OOP codes only.
| About The Author
Shimul Aich is a search engine optimizer of Quality Web Programming. Quality Web Programming is a leading web programming service provider in India.
|
Categories: General