我不能包括我的标题

<?php

require('../includes/config.inc.php');
include ('../includes/header.html');
$page_name = NAME;

$page_title = 'Home';
?>

<div  style="background-color:green;" class="container">
    <div class="section">
        <div class="row">
            <div class="col s6">
                <h3>Welkom</h3>
            </div>
            <div class="col s6">
                <h3>Welcome</h3>
            </div>
        </div>
    </div>
</div>

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

Hello,

For some reason my header doesn't work.

My project consists with these directories

root --index.php --/login ----index.php --/includes ----header.html ----config.inc.php

My index.php displays the header correctly and inherits the config file perfectly, however the index.php in the login folder doesn't include the header. It does include the config though (require).

I tried several things like $_server['DOCUMENT_ROOT'] and stuff but I can't get that header to appear.

</div>

Just rename your file *.html to *.php

like header.php, footer.php

Hey try using this with one period in front of the foward slash and also try it without periods or forward slash

<?php

require('./includes/config.inc.php');
include ('./includes/header.html');
$page_name = NAME;

$page_title = 'Home';
?>

<div  style="background-color:green;" class="container">
    <div class="section">
        <div class="row">
            <div class="col s6">
                <h3>Welkom</h3>
            </div>
            <div class="col s6">
                <h3>Welcome</h3>
            </div>
        </div>
    </div>
</div>

<?php include ('includes/footer.html');
?>
< ?php include 'header.php'; ?>

ALL YOUR CONTENT HERE

< ?php include 'footer.php'; ?>

Please check this link:-https://css-tricks.com/forums/topic/how-to-include-php-headers-and-footers-on-html-site/