Tuesday 28 February 2017

How to compile and run a php program?

1) Install the XAMPP Server in your computer C:\
2) Type the following php program in a notepad

<html>
<body>
<?php
echo"Hello world, welcome to PHP!"
?>
</body>
</html>

3) save the file in C:\xampp\htdocs\yourfolder with name welcome.php


4) Now start XAMPP Server control panel and start apache server, MySql

5) Open the browser, in the addressbar type localhost/yourfolder name and press enter
it will show index of programs list
6) click on welcome.php link

7) Now it will show the output as "Hello world, welcome to PHP!"




No comments:

Post a Comment