I have part built a php site on my pc. I do not want to have a blog style site, but do want to add a single header, single navbar and single footer to the site, and will start building a login area later. I built it on my PC and it worked wonderfully when displaying it in IE, Chrome, Firefox and Safari, so I copied all the files into a test folder on the existing website, and this didn't work. I got the error message
Fatal error: require(): Failed opening required 'includes/navbar.php' (include_path='.:/usr/lib/php5.4')
in /homepages/11/d95668464/htdocs/test/Projects.php on line 54 and haven't a clue what that means.
The required 'includes/header.php and required 'includes/footer.php works correctly and in the right place but the navbar doesn't show at all. The navbar.php code reads:-
<?php
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My Site's Title</title>
<link href="/Styles/Site.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<section class="navigation" data-role="navbar">
<nav>
<ul id="menu">
<li><a href="index.php">Home</a></li>
<li><a href="news.php">News & Events</a></li>
<li><a href="projects.php>Projects</a></li.
<li><a href="contact.php">Contact Us</a></li>
<li><a href="membership.php">Join/Renew</a></li>
<li><a href="links.php">Links</a></li>
</ul>
</nav>
</section>
The code on the page reads:-
<?php
include "includes/navbar.php";
?>
Try to link all of your href's to the correct place.
Right now:
After:(Example: Desktop is whatever folder you may have index.php in. Im just assuming.)