<?php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8829-2" /> <meta name="Description" content="{$description}"> <meta name="Keywords" content="{$keywords}"> <link rel="stylesheet" href="templates/Default/style.css" type="text/css"> <title>{$SiteTitle}</title> </head> <body> <table cellspacing="0" cellpadding="0" align="center" style="width: 780px; border: 1px solid #000000"> <tr><td colspan="2" class="header">{$SiteTitle}</td></tr> <tr> <td class="left_menu">Lewe Menu</td> <td class="center_menu">{CZYTAJ NIŻEJ !}</td> </tr> <tr><td colspan="2" class="footer">Š Copyright 2006 by Lee</td></tr> </table> </body> </html> ?>
no i w miejscu CZYTAJ NIŻEJ chcę aby includowało plik z danym modułem np. news.php (który jest w katalogu głównym) ale jak dam {include_php file="news.php"} to mi wywala bład
Cytat
Fatal error: Cannot redeclare class news in /home/lee/public_html/php/library/news.class.php on line 40
kod pliku news.php
<?php require_once('config.php'); require('library/news.class.php'); $News -> db_query = "SELECT * FROM news ORDER BY id DESC"; $News -> news(); $News -> category($news['id']); foreach ($News -> row as $news) { $News -> comments($news['id']); $read_more = '<a href="news.php?mod=more&id='.$news['id'].'">Czytaj Więcej</a> | '; $smarty -> assign('read_more', $read_more); } else { $read_more = NULL; $smarty -> assign('read_more', $read_more); } $image = '<img src='.$image.' border="0">'; $smarty -> assign('news_image', $image); } else { $image = NULL; $smarty -> assign('news_image', $image); } $smarty -> assign('id', $news['id']); $smarty -> assign('comment', $News -> comment); $smarty -> assign('title', $news['title']); $smarty -> assign('short_text', $news['short_text']); $smarty -> assign('long_text', $news['long_text']); $smarty -> assign('author', $news['author']); $smarty -> assign('data', $news['data']); $smarty -> display('Default/news.tpl'); } } // end if (empty($_GET['mod'])) if ($_GET['mod'] == 'more') { // kod - wyciąłem... } // end else if ($_GET['mod'] == 'more') $smarty -> assign('module', 'news.php'); $smarty -> display('Default/index.tpl');s ?>
jak coś jest niejasne to pytajcie bo w tym chaosie boje się, że coś pominąłem albo źle napisałem

aha zapomniałem dodać, że poboczny plik np news.tpl etc wyglądają mniej więcej tak