PHP application on local host

Asked By 7060 points N/A Posted on -

I am new and in learning phase.

can any one help me how can I launch PHP application on local host???

Best Answer by CapeSteve
Best Answer
Best Answer
Answered By 15 points N/A #82303

PHP application on local host


It is an acronym stands for hypertext preprocessor. PHP is a server side scripting language use to develop web applications. scripts are executed on server.

For this we took a basic application called WAMP server. It stands as windows, apache, mysql, php.
For writing a simple PHP code i have gone through the following  steps:

  • Download WAMP server setup depending upon my system type that may be 32bit or 64bit operating system. URL:
  • Run the setup.Accept the agreement , keep all entries by default, create desktop icon then click install.
  • In the bottom somewhere over task bar you found an icon.left click it and "start all services" and then left click it again and click 'www Directory'. by doing so i got into the folder where my projects are saved.
  • Then i go to 'local host'(again i found it by left clicking the icon) for viewing my site.

Limitation:  port 80 must be released and make it available for wamp server

  • Now write a simple lines of PHP code on notepad: <html>

           echo "Hello World";

  • Save this file as page.php by making "save as type" as all files.
  • Drag and drop the file to the folder where your other wamp project are held.
  • Open browser write on address bar="http://localhost/page.php"

Limitation: be sure that you are online with your wamp server.

Answered By 0 points N/A #82304

PHP application on local host


To launch PHP on your localhost you need to use Apache server and mysql. Install xampp or warm-up in your PC.

It comes with both Apache server and mysql. As you are new, I will describe the process with only xampp on windows.

You can go to this link and download XAMPP. Then you have to install it on your PC.

After installation is complete you should run “XAMPP Control Panel” then start Apache and mysql service.

It will look something like this:

Now open any web browser, for example Internet Explorer or Mozilla Firefox. GOTO http://localhost.

You can notice that localhost is running.

How to use it?

If you keep a PHP file in “htdocs” folder inside “xampp” folder. For example if you keep “test.php” file in “htdocs” folder and write some PHP code in the file. For example:

 <? PHP echo “Hello World”; ?>

Now if you go to http://localhost/test.php you can see that the code is being executed.

Login/Register to Answer

Related Questions