These instructions are for Windows Laptops/Desktops
XAMPP can work on MacBook, but you're better off configuring each piece separately (Apache Web Server, MariaDB, PHP, etc)
MacBook ships with the Apache Web Server pre-installed and configured - so XAMPP installs in an obscure location to avoid the conflict
XAMPP installs to c:/xampp and creates a heirachy of folders
Check to make sure the folder c:/xampp/htdocs
exists. This is going to be our working directly.
htdocs
web-assets web-assets/tpl web-assets/lib
css
and js
folders into c:/xampp/htdocs/web-assets/
c:/xampp/htdocs/web-assets/js/jquery-3.4.1.min.js
c:/xampp/htdocs/web-assets/css/site.css
c:/xampp/htdocs/web-assets/tpl/app_header.php
c:/xampp/htdocs/web-assets/tpl/app_footer.php
htdocs <--- this is your ['DOCUMENT_ROOT'] `-- web-assets |-- css | |-- bootstrap-grid.css | |-- bootstrap-grid.css.map | |-- bootstrap-grid.min.css | |-- bootstrap-grid.min.css.map | |-- bootstrap-reboot.css | |-- bootstrap-reboot.css.map | |-- bootstrap-reboot.min.css | |-- bootstrap-reboot.min.css.map | |-- bootstrap.css | |-- bootstrap.css.map | |-- bootstrap.min.css | `-- bootstrap.min.css.map |-- js | |-- bootstrap.bundle.js | |-- bootstrap.bundle.js.map | |-- bootstrap.bundle.min.js | |-- bootstrap.bundle.min.js.map | |-- bootstrap.js | |-- bootstrap.js.map | |-- bootstrap.min.js | |-- bootstrap.min.js.map | `-- jquery-3.4.1.min.js |-- lib `-- tpl |-- app_footer.php `-- app_header.php
myfirstpage.php
) using the following starter template:
<?php
$page_title = "My First Bootstrap Page";
include_once $_SERVER['DOCUMENT_ROOT'] . '/web-assets/tpl/app_header.php';
echo "<h1>Hello World!</h1>";
include_once $_SERVER['DOCUMENT_ROOT'] . '/web-assets/tpl/app_footer.php';
?>
http://localhost/myfirstpage.php
and should look like this