Home Home

Local PHP

Local PHP - Technique 01 Individually Install the Components

According to our textbook in Chapter 2 you can manually upload a web server, PHP, and a database program such as MySQL. The book explains that the programs are all free, but it is time consuming.

Local PHP - Technique 02 Use an All in One like MAMP or XAMPP

If you use an All-In-One, it is just a few easy steps. This process takes less time. XAMPP is an open-source package that works on Windows. MAMP works for the MacOS.

Local PHP - Technique 03 Run from Command Line

Another option that I found was to run the PHP from command line. According to Geeks for Geeks this is pretty simple. From a computer running windows, you open the command line. Go to the folder or directory where the php file is saved and then enter:

php file_name.php

which should bring up the php file that you want to review..

Summary of the Documentation

Between the textbook material and online searching, these are the 3 options that I found. You can follow the links in the references section of this page for more info from Geeks for Geeks or Apache Friends. There are also many more online sources.

References

https://www.apachefriends.org/

Powers, David; PHP Solutions, Copyright 2019, Fourth Edition, Chapter 2, Pages 7 – 13,

https://www.geeksforgeeks.org/how-to-execute-php-code-using-command-line/