-2

I decided to template my global header and footer and that's when the problem started. The browser is blank and I have no idea how to troubleshoot this. I am using MAMP on a Mac. This is my file structure: enter image description here

This is my index.php:

    <?php

        include('../assets/includes/header.php');

        include('../assets/includes/footer.php');
    ?>

I feel like it has something to do with how I am referencing it in include(), but it would be nice to see an error to read.

Here is my footer.php:

<div id="footer" class="cf">
                        <div class="column three">
                            <strong>Phone</strong>
                            609.505.3395
                        </div><!-- column -->
                        <div class="column three">
                            <strong>Location</strong>
                            <!-- location to go here -->
                        </div><!-- column -->
                        <div class="column three last">
                            <strong>Hours</strong>
                            <em>Tuesday - Thursday</em><br>
                            1:00pm - 9:00pm<br><br>
                            <em>Friday and Saturday</em><br>
                            4:00pm - 11:00pm<br><br>
                            <em>Sunday - Monday</em>
                            Closed<br><br>
                        </div><!-- column -->
                    </div><!-- footer -->
                    <small>&copy;2017 MicroUrb</small>
                </div><!-- content -->


    </div><!-- wrapper -->
    <div class="copyright-info">
        <?php include('../assets/includes/copyright.php'); ?>
    </div><!-- copyright-info -->

</body>
</html>

Here is my header.php:

<!DOCTYPE html>
<html>
<head>
    <title>MicroUrb</title>
    <link rel="stylesheet" href="assets/styles.css">
</head>
<body id="final-example">
    <div class="wrapper">
        <div id="banner">
            <a href="/" title="Return to Home">
                <img src="assets/img/banner0.jpg" alt="MicroUrb">
                <div id="banner__text-content">
                    <h1 id="banner__title">MicroUrb</h1>
                </div>

            </a>
        </div><!-- banner -->

            <div id="nav">
                <?php include('includes/nav.php'); ?>
            </div><!-- nav -->

                <div class="content">
Sahil Gulati
  • 14,401
  • 4
  • 20
  • 39
Daniel
  • 9,020
  • 8
  • 63
  • 101

1 Answers1

3

Paste the below code at top of php file. This will display all the errors. But make sure to comment when in production

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Agam Banga
  • 2,677
  • 1
  • 8
  • 18