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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.