Witam,
wlasnie zaczalem poznawać biblioteke smarty jednak mam problem z uruchomieniem pierwszego skryptu a mianowicie:
struktura katalogu:
www
------ demo
----------- cache
----------- configs
----------- templates
---------------- index.tpl
----------- templates_c
----------- index.php
------ libs
zawartość pliku index.php:
[php:1:8975966fe3]
<?php
define('SMARTY_DIR', '../libs/');
require(SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = $_home_path.'/templates/';
$smarty->compile_dir = $_home_path.'/templates_c/';
$smarty->config_dir = $_home_path.'/configs/';
$smarty->cache_dir = $_home_path.'/cache/';
$smarty->assign('title', 'test strony');
$smarty->assign('text', 'ble ble ble');
$smarty->display( 'index.tpl' );
?>[/php:1:8975966fe3]
zawartość pliku index.tpl:
<html>
<head>
<title>{$title}</title>
</head>
<body>
{$text}
</body>
</html>
i wywala mi taki blad:
Warning: Smarty error: unable to read resource: "index.tpl" in c:foxservwwwsmartylibsSmarty.class.php on line 1102
co moze być nie tak?[color=darkred][/color]