PHP stands for Hypertext Preprocessor. It is a server-side programming language that enables users interact with the web and it powers 70% of the web. Okay, this is not a history post about PHP 😂. To get more history about PHP, you can visit this page.
To be able to work with PHP, we need to save our web pages and resources on the server since it is a server-side language. This means, you guessed it, we must have a server to upload our files to. Servers are expensive in real-life but what if we get a software that can simulate the server environment for us 🤔. The software to help us with this simulation already exists and all you need to do is to download it. It is called WampServer, and you can download it from here. You can as well use XAMPP rather than WampServer and you can get it here. For us, we shall put much focus on WampServer.
After the installation of any of this software, we now have a local server on our machines which we can localhost. It is on this server that we store our web files. To access this server, normally it is in the C/wamp/www folder and that is where we store our files (local disk C, folder wamp, folder www). As a way of putting everything intact, let’s see it practically.
Go to local disk C of your computer, look for a folder called wamp, then move to a folder called www. Inside this folder, create a new folder and name it php_projects. After that, start WampServer software from a list of installed programs on your machine.
When it is launched, you may see nothing displayed on your machine. Why? well, it is just a unique software and that is how it operates 🤣. To confirm this server has been started, it normally hides under system tray icons in the taskbar. You just need to check it.
The green W icon is for WampServer and when you click on it, it brings a pop up with a lot of items as shown in the screenshot above. To confirm if we stored our files well, click on localhost to see a list of projects available on your server. If you saved well, our php_projects folder should be part of the listed projects. (When you click on a localhost, it will be launched in a browser). If your project is not there, you probably saved it in another location. Ensure you save your projects in c/wamp/www.
Now that the environment is set, we can start learning PHP in the next episodes.