Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Smarty - pierwsze starcie z problemami
Skobi
post
Post #1





Grupa: Zarejestrowani
Postów: 174
Pomógł: 1
Dołączył: 19.02.2004

Ostrzeżenie: (10%)
X----


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]
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 04:03