I have a file call view.php, which has the following:
news.php is a separate page that contains news items. Right now, view.php only shows the words "news.php" instead of the actual file, how can I get PHPLib to include the actual file instead?PHP Code:<?php
switch ($page)
{
case 'News':
$display = 'news.php';
break;
//--more similar cases...
}
include ('template/template.inc.php');
$t = new Template();
$t->set_file('layout','layout.inc.php');
$t->set_var('content',$display);
$t->pparse('output','layout');
?>
Also, layout.inc.php contains a user comments box similar to the one at geekarea.org, I did that by including the file rave.php in it <? include('rave.php') ?>. When I open layout.inc.php, no problem, it includes rave.php, grabs the top 5 comments and shows them. But in the other pages, it doesn't parse the PHP code, the actual source says <? include('rave.php') ?>
How can I get PHPLib to include files, and parse PHP code?




Bookmarks