How to run a simple PHP program


This article is for those who want to learn php and wants to know how they can run php on their local machine.

First you need to install wamp on your local machine and then under wamp/www/yourforlder you can place your folder .

Suppose your project name is project1 so the path will be wamp/www/project1 .Now create a file test.php under proejct1 folder. Now the help of your editor you can write php code.Suppose you want to print hello world in the browser so you have to follow following steps.


echo “Hello World”;


Now you have to run this code on web browsers.Just type http://localhost/project1/test.php .

You will get an output Hello World .

Leave a Reply

Your email address will not be published. Required fields are marked *