jacpre Posted July 31, 2008 Share Posted July 31, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.