| Senior Member Join Date: Aug 2002
Posts: 1,300
NP$: 2.85 ( Donate)
| Hey I'm not exactly sure what the resource id 3 means, but I think it's something to do with you're attempting to print some output without ever reading the file or attempting to open nothing or something along those lines.
Something like this should work:
$page = $GET['page'];
if($page ==""){
$handle = fopen ("D:\bin\Apache\htdocs\1\welcome.inc.php", "rb");
$contents = fread ($handle, filesize ("D:\bin\Apache\htdocs\1\welcome.inc.php"));
fclose ($handle);
}else{
$inc = ".inc.php";
$handle = fopen ("D:\bin\Apache\htdocs\1\$page$inc", "rb");
$contents = fread ($handle, filesize ("D:\bin\Apache\htdocs\1\$page$inc"));
fclose ($handle);
}
?>
Then you should be able to output $contents. |