2006-10-04, 05:27 AM
i have a question, i want to use the following php code to display pages dynamically in a new file called content.php... the problem is, i cant get it to work...
the code in content.php is
Can anyone please help me ???
<?php
$id = $_GET['id'];
if(!file_exists("$id.html") || empty($id) || !$id) {
require_once '/home/beyond/public_html/hpb/news.html'; }
else {
require_once "$id.html"; }
?>
the code in content.php is
<?php
define("IN_MYBB", 1);
require "./global.php";
if($mybb->user['uid'])
{
add_breadcrumb("Content", "content.php");
eval("\$content = \"".$templates->get("content")."\";");
output_page($content);
}
else
{
add_breadcrumb("Error", "content.php");
eval("\$login_error = \"".$templates->get("login_error")."\";");
output_page($login_error);
}
?>
Can anyone please help me ???