In this tutorial, we will learn about Environment setup for PHP. As we learnt in the last tutorial we have to install a virtual server on our PC to run PHP code. Here we will learn in detail how we can install a virtual server on our PC.
There are a lot of virtual servers available in the market which helps us to create PHP projects. But we will use XAMPP in this tutorial series. So to install XAMPP server follow this link.
By following this link you will land on Apachefriends.org site from there you can install any latest version of XAMPP server setup according to OS requirements. After downloading setup please install it in your machine by following instructions.
After complete installation, you can see There is XAMPP folder in C drive(In Windows) as shown in the picture.
If you will open this xampp folder then you will htdocs folder there. In this htdocs folder, we will create and save our project files. Now we where will keep our project files but now the problem is how to run our project. So to run the project you have started our server. so to start server just search XAMPP and open XAMPP Control panel.
A Screen like this will open. just click on the start button in front of Apache and MYSQL like shown in the image below.
After that open browser and type localhost. If you got screen like given below it means your virtual server is ready to work. In the next tutorial, we will learn how to write a hello world program in PHP.