我决定模拟我的全局页眉和页脚,这就是问题开始的时候。浏览器是空白的,我不知道如何解决这个问题。我在Mac上使用MAMP。这是我的文件结构:
这是我的index.php:
<?php
include('../assets/includes/header.php');
include('../assets/includes/footer.php');
?>
我觉得它与我在include()中引用它的方式有关,但是看到要读取的错误会很好。
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>©2017 MicroUrb</small>
</div><!-- content -->
</div><!-- wrapper -->
<div class="copyright-info">
<?php include('../assets/includes/copyright.php'); ?>
</div><!-- copyright-info -->
</body>
</html>
这是我的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">
答案 0 :(得分:2)
将以下代码粘贴到php文件的顶部。这将显示所有错误。但请确保在production
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);