1If your PHP code is being displayed in the browser, it means that your
2server has not been setup to serve PHP scripts.
3
4You can use something like XAMPP. If you do, activate 'Apache' and 'MySQL'
5
6After you do that, go into the download directory and go into 'htdocs'
7(default: 'C:\xampp\htdocs')
8
9Make a folder with your PHP code in it.
10
11To access the website, go into your browser and type:
12
13localhost/FOLDER_NAME_WITH_PHP_HERE
14
15NOTE:
16 this will only allow you to view it locally, nobody else will be able
17 to see the website.
1sudo apt-get install php libapache2-mod-php
2sudo a2enmod mpm_prefork && sudo a2enmod php7.0
3sudo service apache2 restart