Lewis Marshall22,670 Points
There's 2 workshops by Alena to setup a local host with MAMP for MAC and Windows:
Php is server side scripting language, you can't run it normally like HTML,CSS. Download Xampp, download the version depending on your type of Operating System. Then, you run the xampp. As soon as u install and run Xampp. A control panel will open of Xampp. Switch on Apache, MySql( I mean to say click the start button). Then after it shows the status running, click mycomputer or whatever it is in your desktop. Open Xampp folder in C drive, in Xampp folder you will find another folder called htdocs. Open it, all the php programs will be written here. After creating a program like for example hello world. You will open your browser. You will type in the search bar "https://localhost/helloworld.php" then click enter.
Hi Adhitya, If you do not work with Treehouse's workspace console, it is essential that you will download a web server program such as Xampp. This will include within it Apache and MySQL to work with databases later. To view your PHP code you will then have to access to your localhost and the name of the file. For example, if your port is 80 then you need to type in the browser localhost:80/1.php
Pay attention that if you name your file 'index.php' it will not display it in the localhost with the rest of your files and you will have to type it manually in the browser.