include_once problems
Hi all,
Im working on a website, and im having some problems with the include system. I take (and clean) the page variable, and can echo the results to the page just fine. I can also include and include_once the page fine, but when I try and add or die() at the end, I get this error:
Warning: include_once(1) [function.include-once]: failed to open stream: No such file or directory in /home/freehost/t35.com/p/r/projectvault/index.php on line 23
Warning: include_once() [function.include]: Failed opening '1' for inclusion (include_path='.:/usr/local/lib/php') in /home/freehost/t35.com/p/r/projectvault/index.php on line 23
I think its evaluating it as an or statement, but I dont know why the $page variable is being affected. Here is the code:
<?php
if(isset($_GET['page'])) {
$page = "./".ficlean($_GET['page']).".php";
include_once($page) *or die()*;
} else {
include_once("main.php");
}
?>
Any ideas?