Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
jonathansh1115

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:

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

 

-My header.html:

<!DOCTYPE html>
<html>
<head>
    <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">
    </head>
    
    <body>
        <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>
              </button>
              <a class="navbar-brand" href="#">WEBNAME</a>
            </div>
            <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>
              <ul class="nav navbar-nav navbar-right">
                <li><a href="#">Welcome</a></li>
                <li><a href="login.php">Logout</a></li>
              </ul>
            </div><!--/.nav-collapse -->
          </div>
        </nav>
 
 
 
 
PLEASE HELP
 
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...