Smarty непонятная мне ошибка

zah

Guest
Smarty непонятная мне ошибка

решил освоить Smarty но в самом начале столкнулся с проблемой:
После установки решил запустить пример прилагаемый с Smarty
<?php

require 'libs/Smarty.class.php';

$smarty = new Smarty;

$smarty->compile_check = true;
$smarty->debugging = true;

$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
array("I", "J", "K", "L"), array("M", "N", "O", "P")));

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");

$smarty->display('index.tpl');

?>

Получаю следующую ошибку:
Warning: fetch(templates_c\%%117^%%1172603085^index.tpl.php): failed to open stream: No such file or directory in E:\PHP\pear\libs\Smarty.class.php on line 1266

Warning: fetch(): Failed opening 'templates_c\%%117^%%1172603085^index.tpl.php' for inclusion (include_path='E:\PHP\pear\') in E:\PHP\pear\libs\Smarty.class.php on line 1266

Warning: _include(templates_c\%%161^%%1615370486^debug.tpl.php): failed to open stream: No such file or directory in E:\PHP\pear\libs\Smarty.class.php on line 1965

Warning: _include(): Failed opening 'templates_c\%%161^%%1615370486^debug.tpl.php' for inclusion (include_path='E:\PHP\pear\') in E:\PHP\pear\libs\Smarty.class.php on line 1965

PHP ver. 4.3.6 Smarty ver. 2.6.2 Все работает на Windows XP
PS
Прошу прощения за размещение не в ту тему!
 

Demiurg

Guest
>No such file or directory in E:\PHP\pear\libs\Smarty.class.php
что не понятно ?
 

Oleg Marchuk

Человек
Директории ты не прописал. Читай ДОКи по установке внимательнее.
 

zah

Guest
дело в том что данный файл есть в указанном месте....а ошибка представляется мне в доступе к templates_c но почему незнаю!Ё

-~{}~ 07.06.04 16:55:

Проблема решена действительно были не указанны директории указал я их так
$smarty->template_dir = 'e:/www/demo/templates/';
$smarty->compile_dir = 'e:/www/demo/templates_c/';
но странно почему относительные пути не сработали =(
 

tony2001

TeaM PHPClub
>но странно почему относительные пути не сработали =(
относительно _чего_ ?
Smarty.class.php ? скрипта, который инклудит Smarty.class.php ? или скрипта, который инклудит скрипт, который инклудит Smarty.class.php ?
 
Сверху