I've been struggling for days now. I followed a PHP tutorial to make a template. but I can't get my cutenews to display correctly. If I create another .php page and include it in my index.php it shows before the header. I have a header, left column and right column (this is where my cutenews must display). Here is my index.php code:
<?php
if (isset($REQUEST['page']))
{
if($REQUEST['page'] !="")
if(file_exists("pages/".$REQUEST['page'].".html"))
$page_content = file_get_contents("pages/".$REQUEST['page'].".html");
else
if (file_exists($REQUEST['page'].".html"))
$page_content = file_get_contents($REQUEST['page'].".html");
else
echo "<center>Page:".$_REQUEST['page']." does not exist! Please check the url and try again!</center>";
}
else
$page_content = file_get_contents("pages/main.html");
$page_content = str_replace("!!HEADER!!", file_get_contents("design/header.html"),$page_content);
$page_content = str_replace("!!LEFT_COLUMN!!", file_get_contents("design/left_column.html"),$page_content);
$page_content = str_replace("!!COMMON_TAGS!!", file_get_contents("design/common_tags.html"),$page_content);
$page_content = str_replace("!!NEWS!!", file_get_contents("news.php"),$page_content);
echo $page_content;
?>
Hope that someone can help me.