ustawienia.php
<?php // baza danych // Smarty $smarty->compile_check = true; $smarty->debugging = true; $smarty->template_dir = STYL_PATH ; $smarty->compile_dir = STYL_PATH . "Smartytemp/templates_c"; $smarty->config_dir = STYL_PATH . "Smartytemp/configs"; $smarty->cache_dir = STYL_PATH . "Smartytemp/cache"; ?>
index.php
<?php require_once 'klasy/class.db.php'; require_once 'system/Smarty/Smarty.class.php'; $smarty = new Smarty; require_once 'system/ustawienia.php'; $smarty->display('gora.tpl'); { $db = new db(); $db->fetcharray("SELECT * FROM `".DB_PREFIX."strony` WHERE `kod`='".$p."' "); if($db->rekordy == TRUE) { { include $db->rekordy[0]['plik'].'.php'; } } } else { include 'news.php'; } $smarty->display('dol.tpl'); ?>
a błędy takie
Warning: Smarty error: unable to read resource: "news.tpl" in c:\usr\krasnal\www\homepage\system\Smarty\Smarty.class.php on line 1095
Warning: Smarty error: unable to read resource: "news.tpl" in c:\usr\krasnal\www\homepage\system\Smarty\Smarty.class.php on line 1095
Jak w pierwszy display wpiszę dol.tpl albo news.tpl to się normalnie otwiera.