Jump to content

Cutenews problem


jacpre

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/117592-cutenews-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.