PHP Deployment (XAMPP)

This is a short introduction to help you deploy your PHP programs using XAMPP. For more information on XAMPP, please visit https://www.apachefriends.org/
(Please let me know if you find any errors or omissions in the document —Upsorn Praphamontripong, 28-September-2023)

XAMPP is an open source package that is widely used for PHP development. XAMPP contains MariaDB, PHP, and Perl; it provides a graphical interface for SQL (phpMyAdmin), making it easy to maintain data in a relational database.

If you have not installed XAMPP, please refer to XAMPP-setup to install and set up XAMPP.

Assuming that you have already set up XAMPP

  • Start the PHP environment ("Apache Web Server")

Reminder: be sure to stop the server when you are done. Leaving the servers running consumes energy and may later prevent the servers from starting.


Deploy a PHP app

  1. Assume your project is named  cs4750,  create a folder called  cs4750.  In the  cs4750  folder, create a blank file named  helloworld.php. Paste the following contents in the file
    <?php echo "Hello World @^_^@" ?>
  2. Create a directory for your project in  XAMPP/htdocs/. Put  helloworld.php  file under  XAMPP/htdocs/cs4750/

Access an app

Be sure to start your web server. To access your app, open a web browser and enter a URL
    http://localhost/cs4750/helloworld.php


Copyright © 2023 Upsorn Praphamontripong

Released under the Creative Commons License CC-BY-NC-SA 4.0 license.

Last updated 2023-09-28 10:26