how do I troubleshoot blank browser in PHP
本问题已经有最佳答案,请猛点这里访问。
我决定模板我的全球页眉和页脚,这是问题开始的时候。浏览器是空白的,我不知道如何解决这个问题。我在用Mac电脑。这是我的文件结构:
这是我的index.php:
1 2 3 4 5 6 | <?php include('../assets/includes/header.php'); include('../assets/includes/footer.php'); ?> |
我觉得这和我在include()中引用它的方式有关,但是看到要读取的错误会很高兴。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | Here is my footer.php: Phone 609.505.3395 <!-- column --> Location <!-- location to go here --> <!-- column --> Hours Tuesday - Thursday 1:00pm - 9:00pm Friday and Saturday 4:00pm - 11:00pm Sunday - Monday Closed <!-- column --> <!-- footer --> <small>©2017 MicroUrb</small> <!-- content --> <!-- wrapper --> <?php include('../assets/includes/copyright.php'); ?> <!-- copyright-info --> </body> </html> |
这是我的header.php:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <!DOCTYPE html> <html> <head> MicroUrb <link rel="stylesheet" href="assets/styles.css"> </head> <body id="final-example"> <img src="assets/img/banner0.jpg" alt="MicroUrb"> <h1 id="banner__title">MicroUrb <!-- banner --> <?php include('includes/nav.php'); ?> <!-- nav --> |
将下面的代码粘贴到PHP文件的顶部。这将显示所有错误。但在
1 2 3 |