Menu

Running PHP Program On XAMPP Server for Windows PC

Hello buddies, thinking how to run PHP Program on XAMPP Server on your Windows? But don’t know how? Here, I am with this new tutorial on How to run PHP program on the XAMPP Server for Windows.In this tutorial, we will be installing the XAMPP server and we will be running a simple PHP Program to test it.

Read More:- Removing Movie.bat virus on Windows 10

So, let’s get started

What is XAMPP?

XAMPP is an open source cross-platform and lightweight web server package developed by Apache Friends.It includes the Apache Server, MariaDB database, PHP and Perl languages.It is free and it is used as a local server by the developers for their projects.As it is cross-platform it works well on Linux too.

Steps for Installing XAMPP Server On Your Windows:-

Step 1:- Download and install the XAMPP Server from this link.

Step 2:- After installing the XAMPP server now lets run the Server.Open the XAMPP Server application.

Running XAMPP on Windows

Step 3:- Click on the “Start” for starting the Apache server.

Running XAMPP Server on Windows

Step 4:- Now as the server is started let’s write our PHP Program and run it.

Goto C:  drive -> XAMPP Folder-> htdocs and create a new folder.Let’s name it as “Project“.

 

Read More:-  Hack and use WiFi for Free

 

Step 5:- Inside the folder open a new text document and copy the below PHP code

 

//hello world program in PHP

<?php

echo “Hello world”;

?>

Now save this with a name and as type  “.php“. I have named it as “phpproject.php”.

Step 6:- Now open the browser and type “localhost” and press enter.

If the below screen appears then it means that XAMPP has started successfully.

Running PHP on XAMPP

Step 7:- Type localhost/foldername in the URL Box.Here, we had named the folder as “project“.So, the URL will be localhost/project. Press Enter.

Step 8:- Click on the file name, in which you had saved the php program file.

Now the output is displayed.

OUTPUT:

Hello World

 

 

In this way, you can run your PHP programs on the XAMPP Server on your Windows PC.Hope this tutorial helps you.

 

If you liked this then do share this tutorial and if you have any suggestions and doubts regarding this then feel free to write down in the Comments section.

 

Leave a Reply

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

%d bloggers like this:
DMCA.com Protection Status