Jump to content
Larry Ullman's Book Forums

Php "include('header.html')" Wont Include Css Script Tag In Header.html

Recommended Posts

i have some css tags in the header for my stylesheet and bootstrap and i tried to include the header.html as learnt from the book but it failed to load up instead it load up plain html.


-My index.php:

require ('includes/config.inc.php'); 
$page_title = 'Homepage';
include ('includes/header.html');
include ('includes/footer.html');


-My header.html:

<!DOCTYPE html>
    <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title><?php echo $page_title; ?></title>
        <link href="../css/bootstrap.min.css" rel="stylesheet">
        <link href="nav.css" rel="stylesheet">
        <nav class="navbar navbar-default">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              <a class="navbar-brand" href="#">WEBNAME</a>
            <div id="navbar" class="collapse navbar-collapse">
              <ul class="nav navbar-nav">
                <li class="active"><a href="../index.php">Home</a></li>
                <li><a href="../pages.html">Recent</a></li>
                <li><a href="../posts.html">Posts</a></li>
                <li><a href="../users.html">Users</a></li>
              <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Welcome</a></li>
                <li><a href="login.php">Logout</a></li>
            </div><!--/.nav-collapse -->
Link to comment
Share on other sites


  • Create New...