0% found this document useful (0 votes)
112 views

Run A PHP Program in XAMPP Server

run info

Uploaded by

Rashmi Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Run A PHP Program in XAMPP Server

run info

Uploaded by

Rashmi Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

6/24/2016

RunaPHPprograminXAMPPServer
We are hiring

RunaPHPprograminXAMPPServer
AmitDiwan

,PostedonFebruary27,2013,filedin:WebDesign

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:
ItisserversidescriptinglanguageforproducingdynamicWebpages.PHPwasoriginallycreatedbyRasmusLerdorfin1995.Thfullformof
PHPisarecursivenamei.e.PHPHypertextPreprocessor.
PHPprogramcanberunundervariouslikeWAMP,XAMPPetc.
WAMPServer:thisserverisawebdevelopmentplatformwhichhelpsincreatingdynamicwebapplications.
XAMPPServer:Itisafreeopensourcecrossplatfromwebserverpackage.

IamusingXamppServertorunmyprogram,youcandownloaditfromthefollowinglink:
http://www.apachefriends.org/en/xamppwindows.html
Afterdownloading,justfollowthefollowingsteptostartxamppserver:

Step1
InstallXAMPP

Step2
AssumeyouinstalledxamppinCDrive.
Goto:C:\xampp\htdocs
Createyourownfolder,nameitforexampleastutorialspoint.

Step3
Nowcreateyourfirstphpprograminxamppandnameitasadd.php:
<html>
<head><title>Additionphp</title></head>
<body>
<?php

#operator

print"<h2>phpprogramtoaddtwonumbers...</h2><br/>";

$val1=20;
$val2=20;
$sum=$val2+$val2;/*Assignmentoperator*/
echo"Result(SUM):$sum";
?>
</body>
</html>

Step4
NowdoubleclickonXAAMPCONTROLPANELondesktopandSTARTApache
(iconalsoappearsonthebottom)

http://www.tutorialspoint.com/articles/runaphpprograminxamppserver

1/4

6/24/2016

RunaPHPprograminXAMPPServer

Step5
Typelocalhostonyourbrowserandpressenter:
Itwillshowthefollowing:

Step6

Nowtypethefollowingonbrowser:
http://localhost/tutorialspoint/
Belowscreenshotshowsphpfilescreatedunderfoldertutorialspoint

Step7
http://www.tutorialspoint.com/articles/runaphpprograminxamppserver

2/4

6/24/2016

RunaPHPprograminXAMPPServer

Clickonadd.phpanditwillshowthefollowing:

TheRESULTis40byaddingboththevalues.
ThiswayyoucanrunyourphpprograminXAMPPserver

28Comments

Sortby Oldest

Addacomment...

ZnbMdrTehran,Iran
Veryusefule
LikeReply

6Aug19,20153:23am

KhizerAliAptechLahore
thanks...
LikeReply

3Aug23,20152:53am

ParthPatelWorksatStudy(chess)
btstep5isnotallowforme..owhatiamdoingnow..?
LikeReplyAug24,201511:50am

NeemaJohnUDOM
ThistutorialwassoUSEFULtome,asitwasmyfirsttimetorunXAMPPinmytoshibalaptop
LikeReply

3Aug26,201512:39am

NazAula
thanksbutmyxamppdon'tshowstep5,myapachedon'twork...whatcanIdo?pleasehelp
LikeReply

1Aug26,20151:00am

ShuhMRubelChittagongMunicipalModelHighSchool
thenyourxamppdidn'tinstallproperly..
LikeReplyNov3,20159:13pm

Load10morecomments

FacebookCommentsPlugin

Previous
Next

http://www.tutorialspoint.com/articles/runaphpprograminxamppserver

Advertisements

3/4

6/24/2016

RunaPHPprograminXAMPPServer

GOOGLE HOSTING SERVICE

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

http://www.tutorialspoint.com/articles/runaphpprograminxamppserver

go

4/4

You might also like