Introduction

PHP was introduced in 1995. The full form of PHP at that time was Personal Home Page. But now it is known as Hypertext Preprocessor. PHP is an Open Source. It is server side Scripting language which is embedded with HTML. PHP is generally used to develop dynamically web based application. PHP is very fast and easy to learn. It support almost all database like MySql(which is mostly used with PHP), oracle, MS SQL Server etc.

Compilation of PHP

Phalanger is a compiler which compiles the PHP code into Common Intermediate Language bytecode and then this code executed by PHP Engine.

PHP Server installation

As I already told that php is a server side scripting language so we need server to run php code. There are many servers to run php program. If you are using Windows Operating System then you can install Wamp server which stands for Windows Apache MySql and PHP or Perl or python. It is a complete package. And if you are using Linux Operating System then you can install Lamp which stands for Linux Apache MySql and PHP or Perl or python.

Here I am using Wamp server. When you installed wamp server you will get wamp folder in your C drive. In this folder there is another folder name www. To run php code we have to put all php files in this folder. Php files having .php extension. We can use Notpad or Notepad++ to create php files.

Hello Application using PHP

We can perform following arithmetic operator with the select statement:-

1. Open the Notepad or Notepad++.
2. Every php code written between the following code:

<?Php
  
Php code…………

?>
		

3. To print on the screen we use echo command.

<?php

echo 'hello Isha Malhotra';

?<
		

With echo you can use both single quotation and double quotation.

To execute this code save it with .php extention and save it in the

C:\Wamp\www\hello.php

After that start the Wamp server then open any browser and type following code:-

http://localhost:8080/hello.php

Note:-8080 is port number. As I am using two Servers(IIS and Wamp) so that I have to change its port number. But if you are using only Wamp server then it will be 80. But if you have skype in your computer then you also have to change your port number by replacing the 80 to 8080 in httpd.conf file. Following is the way to open this file:-

PHP introduction

		Figure 1
		

Now Edit this file by replacing 80 with 8080 and save it.

Email Address

For any query you can send mail at info@techaltum.com
Thanks