Posted By:
8 Feb, 2014 6:46 am PST

Steps on how to write, run, and compile a first basic code in PHP

Steps on how to write, run, and compile a first basic code in PHP

 

1.We can write the PHP code into Notepad but I have used Dreamviewer software.Dreamviewer is an IDE(Integrated Development Environment).It is used to design and code PHP,HTML and CSS but can also be used languages.The green icon shown below is Dreamviewer icon on Desktop.

imp1

2.Open Dreamviewer and you will see the below screen.

imp2

3.We will see below screen.

imp3

4.Go on the site option aboveand give the site name.Locate the folder and click okimp4

 

5. . For wamp server ,go to C drive and open wamp then www and create a folder say, IntroducingPHP.

 

imp5

6.Write the php code .Php code begins with <?php and ends with ?>.To print we use Echo keyword as shown below,

imp6

7.Save the file with .php fileas shown below (Intro.php).

imp7<![endif]>

8.Here on the screen there is a pink iconof WampServer.WampServer is a web-development environment.It allows you to create web applications with Apache2,PHP and MySQL database.

imp8

 

9.After opening WampServer you will see the below screen.

imp9

10.Open the folder in which you saved your .php file

imp10

 

 

11.After opening this folder .php file will be visible.Click on it to see the output.

imp11

12.Output is as follow.

imp12

Attachment: imp12.png



Please login to reply to this problem.