[SOLVED] Resource id #3
Posted: Sun Sep 05, 2004 11:35 am
Hey there ppl, i'm trying to make a 'content displayer' for my site, that loads *.inc files via index.php?page=bla.
This is my script:
I get no errors with this (although it doesn't display what it's supposed do) i just get the message 'Resource id #3' where the content should be..
Any ideas ? Cus i have no clue what this means, and when i search for other examples, it's all to do with database things...
This is my script:
Code: Select all
if (isset($_REQUEST['page']))
{
$inc = $_REQUEST['page'].".inc";
if (!file_exists($inc))
{
$content = "Page not found";
}
else
{
$file = file($inc);
$fp = fopen($inc, "w");
fclose($fp);
$content = $fp;
}
}
else
{
$file = file("main.inc");
$fp = fopen("main.inc", "w");
fclose($fp);
$content = $fp;
}Any ideas ? Cus i have no clue what this means, and when i search for other examples, it's all to do with database things...