MyBB Community Forums

Full Version: php Includes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...
<?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 ???
never mind.... found it out myself... mods, please close topic Smile