Hello,
The website I am practicing on at the moment is www.immystudios.com I am new to php and mysql
I get this error, and I do not know why on my live site…but it works perfectly fine on my local host
Fatal error: require_once(): Failed opening required '\..\dbconnect.php' (include_path='.:/usr/lib/php7.0') in /homepages/40/d666957300/htdocs/Student/includes/nav.php on line 8
This is my nav file
<ul>
<?php
ob_start();
session_start();
require_once '\..\dbconnect.php';
// if the user is not logged in display this
if( !isset($_SESSION['user']) ) {
foreach($notLoggedIn as $item)//navItems
{
echo "<li><a href=\"$item[slug]\">$item[title]</a></li>";
}
}
//If the user is logged in do this!
else
{
foreach($loggedIn as $item)
{
echo "<li><a href=\"$item[slug]\">$item[title]</a></li>";
}
}
?>
</ul>
Can anyone help me? You can also go to www.immystudios.com to see the error first hand