Forum Moderators: coopster

Message Too Old, No Replies

Failed opening 'admin.php' for inclusion

         

PartisanEntity

9:00 pm on Jan 3, 2010 (gmt 0)

10+ Year Member



Hi all,

following issue:

my index.php file looks like this:

# Menu Selection
if(isset($_GET['page'])){
if($_GET['page']=="about"){
$title = "- About";
$content = "about.php";
}elseif($_GET['page']=="carconfig"){
$title = "- Car Configurator";
$content = "carconfig.php";
}elseif($_GET['page']=="gallery"){
$title = "- Gallery";
$content = "gallery.php";
}elseif($_GET['page']=="news"){
$title = "- News";
$content = "news.php";
}elseif($_GET['page']=="login"){
$title = "- Login";
$content = "login.php";
}elseif($_GET['page']=="register"){
$title = "- Register";
$content = "register.php";
}elseif($_GET['page']=="contact"){
$title = "- Contact";
$content = "contact.php";
}
elseif($_GET['page']=="admin"){
$title = "- Admin";
$content = "admin.php";
}
}else{
$title = "- Home";
$content = "content.php";
}

include('header.php');

include('menu.php');

include('contentarea.php');

include('lowerarea.php');

include('footer.php');

My contentarea.php files looks like this:

<div id="contentarea">
<div class="content">
<?php include ($content); ?>
</div>
</div>
Yet when I try to open my admin.php file by clicking on my link:

<a href="?page=admin">admin</a>

I get this error:

Warning: include(admin.php) [function.include]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/main/contentarea.php on line 3

Warning: include() [function.include]: Failed opening 'admin.php' for inclusion (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/modcars/main/contentarea.php on line 3

Is there something I need to do in the php5.ini file?

Thank you!

coopster

9:07 pm on Jan 3, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Can the files actually be found in that include path [php.net]?

PartisanEntity

5:15 pm on Jan 4, 2010 (gmt 0)

10+ Year Member



oops that was it, i accidentally saved admin.php to another folder. I guess sometimes it helps to slow down and take the errors seriously.

Thanks.