4
6/24/2016 Run a PHP program in XAMPP Server http://www.tutorialspoint.com/articles/runaphpprograminxamppserver 1/4 We are hiring Amit Diwan , Posted on February 27, 2013, filed in: Web Design This post is basically for those who want to run their first program under php. I just want to give an introduction related to PHP before starting: It is serverside scripting language for producing dynamic Web pages.PHP was originally created by RasmusLerdorf in 1995. Th fullform of PHP is a recursive name i.e. PHP Hypertext Preprocessor. PHP program can be run under various like WAMP, XAMPP etc. WAMP Server: this server is a web development platform which helps in creating dynamic web applications. XAMPP Server: It is a free open source crossplatfrom web server package. I am using XamppServer to run my program, you can download it from the following link: http://www.apachefriends.org/en/xamppwindows.html After downloading, just follow the following step to start xampp server: Install XAMPP Assume you installed xampp in C Drive. Go to: C:\xampp\htdocs Create your own folder, name it for example as tutorialspoint. Now create your first php program in xampp and name it as “add.php”: <html> <head><title>Addition php</title></head> <body> <?php # operator print "<h2>php program to add two numbers...</h2><br />"; $val1 = 20; $val2 = 20; $sum = $val2 + $val2; /* Assignment operator */ echo "Result(SUM): $sum"; ?> </body> </html> Now double click on “XAAMP CONTROL PANEL” on desktop and START “Apache(icon also appears on the bottom) Run a PHP program in XAMPP Server Step1 Step2 Step3 Step4

Run a PHP Program in XAMPP Server

Embed Size (px)

DESCRIPTION

run info

Citation preview

Page 1: Run a PHP Program in XAMPP Server

6/24/2016 Run a PHP program in XAMPP Server

http://www.tutorialspoint.com/articles/run­a­php­program­in­xampp­server 1/4

We are hiring

 Amit Diwan , Posted on February 27, 2013, filed in: Web Design

 

This post  is basically  for  those who want  to  run  their  first program under php.  I  just want  to give an  introduction related  to PHP beforestarting:

It is server­side scripting language for producing dynamic Web pages.PHP was originally created by RasmusLerdorf in 1995. Th full­form ofPHP is a recursive name i.e. PHP Hypertext Preprocessor.

PHP program can be run under various like WAMP, XAMPP etc.

WAMP Server: this server is a web development platform which helps in creating dynamic web applications.

XAMPP Server: It is a free open source cross­platfrom web server package.

I am using XamppServer to run my program, you can download it from the following link:http://www.apachefriends.org/en/xampp­windows.htmlAfter downloading, just follow the following step to start xampp server:

Install XAMPP

Assume you installed xampp in C Drive.Go to: C:\xampp\htdocs

Create your own folder, name it for example as tutorialspoint.

Now create your first php program in xampp and name it as “add.php”:

<html> <head><title>Addition php</title></head> <body> 

<?php     # operator   print "<h2>php program to add two numbers...</h2><br />";               $val1 = 20;               $val2 = 20;               $sum = $val2 + $val2;   /* Assignment operator */               echo "Result(SUM): $sum"; ?> 

</body> </html>

Now double click on “XAAMP CONTROL PANEL” on desktop and START “Apache”(icon also appears on the bottom)

Run a PHP program in XAMPP Server

Step1

Step2

Step3

Step4

Page 2: Run a PHP Program in XAMPP Server

6/24/2016 Run a PHP program in XAMPP Server

http://www.tutorialspoint.com/articles/run­a­php­program­in­xampp­server 2/4

 

Type localhost on your browser and press enter:It will show the following:

Now type the following on browser:http://localhost/tutorialspoint/Below screenshot shows php files created under folder “tutorialspoint”

Step5

Step6

Step7

Page 3: Run a PHP Program in XAMPP Server

6/24/2016 Run a PHP program in XAMPP Server

http://www.tutorialspoint.com/articles/run­a­php­program­in­xampp­server 3/4

Click on “add.php” and it will show the following:

The RESULT is 40 by adding both the values.This way you can run your php program in XAMPP server…

 

« PreviousNext »

Advertisements

28 Comments Sort by 

Znb Mdr · Tehran, IranVery usefule 

Like · Reply ·  6 · Aug 19, 2015 3:23am

Khizer Ali · Aptech Lahorethanks... 

Like · Reply ·  3 · Aug 23, 2015 2:53am

Parth Patel · Works at Study (chess)bt step 5 is not allow for me..o what i am doing now..?Like · Reply · Aug 24, 2015 11:50am

Neema John · UDOMThis tutorial was so USEFUL to me, as it was my first time to run XAMPP in my toshiba laptop

Like · Reply ·  3 · Aug 26, 2015 12:39am

Naz Aulathanks but my xampp don't show step 5 , my apache don't work ...what can I do? please help

Like · Reply ·  1 · Aug 26, 2015 1:00am

Shuh M Rubel · Chittagong Municipal Model High Schoolthen your xampp didn't install properly..Like · Reply · Nov 3, 2015 9:13pm

Facebook Comments Plugin

Oldest

Add a comment...

Load 10 more comments

Page 4: Run a PHP Program in XAMPP Server

6/24/2016 Run a PHP program in XAMPP Server

http://www.tutorialspoint.com/articles/run­a­php­program­in­xampp­server 4/4

G O O G L E H O S T I N G S E R V I C E

apps.google.com/sites

Custom Domain & Build Your Own Site Start With Free Google Apps Trial.

Write for us FAQ's Helping Contact© Copyright 2016. All Rights Reserved.

Enter email for newsletter go