PHP programming Reference

2014 年 8 月 14 日4290

What is PHP? PHP is a recursive acronym for Hypertext Preprocessor. It is a server-side scripting language whose main purpose is to generate the HTML code, which can be viewed by the client. As such, the PHP code itself is not visible to the clients (i.e., if you do a "view source" in your web browser, you cannot see the PHP code. You can only see the resulting HTML code). This contrasts with client-side languages such as Javascript, which is visible to the client.

PHP was first created by Rasmus Lerdorf in 1995, and saw its first official release in 1997. Milestone releases included PHP 3 in 1998, PHP 4 in 2000, and PHP 5 in 2004. Today, many large-scale websites run on PHP. The author was first introduced to PHP in 2000, and have found the language to be pretty easy to work with.

Below is a simple "Hello World" program, PHP flavor:

<?php

print "Hello World.";

?>

Executing this program on a web server enabled with PHP produces the following output:

Hello World.

PHP programs usually have an extension of .php.

By the end of this tutorial, you should have a good understanding of the basic constructs of PHP, as well as how PHP can interact with MySQL to produce dynamic web pages. Please bookmark this site now by pressing Control-D and start to learn PHP now.

Next: PHP Variables


Copyright © 2014 1keydata.com All Rights Reserved. Privacy Policy

0 0