[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: Ошибка smarty
jarskii
При выборе категории на сайте, должна выводить информация из базы mysql
вместо этого выводит ошибку


ERRNO:256
TEXT: Smarty error: [in department.tpl line 9]: syntax error: unrecognized tag 'public' (Smarty_Compiler.class.php, line 590)
LOCATION: C:\tshirtshop\libs\smarty\Smarty.class.php, line 1110, at 1
Showing backtrace:
ErrorHandler.GetBacktrace("2") # line 15, file: C:\tshirtshop\business\error_handler.php
ErrorHandler.Handler("256", "Smarty error: [in department.tpl line 9]: syntax error: unrecogn...", "C:\tshirtshop\libs\smarty\Smarty.class.php", "1110", Array[2]) # line 0, file: unknown
trigger_error("Smarty error: [in department.tpl line 9]: syntax error: unrecogn...", "256") # line 1110, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty.trigger_error("[in department.tpl line 9]: syntax error: unrecognized tag 'publ...", "256") # line 1832, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty._trigger_fatal_error("syntax error: unrecognized tag 'public'", "department.tpl", "9", "C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php", "590", "256") # line 2221, file: C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php
Smarty_Compiler._syntax_error("unrecognized tag 'public'", "256", "C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php", "590") # line 590, file: C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php
Smarty_Compiler._compile_tag("public $mName;
public $mDescription;

private $_mDepa...") # line 312, file: C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php
Smarty_Compiler._compile_file("department.tpl", "{* department.tpl *}
{load_presentation_object filename="depart...", null) # line 1506, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty._compile_source("department.tpl", "{* department.tpl *}
{load_presentation_object filename="depart...", null, "templates_c\%%69^691^6917ADC1%%department.tpl.inc") # line 1439, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty._compile_resource("department.tpl", "templates_c\%%69^691^6917ADC1%%department.tpl.php") # line 1884, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty._smarty_include(Array[2]) # line 34, file: C:\tshirtshop\templates_c\%%41^412^412F4E3D%%store_front.tpl.php
include("C:\tshirtshop\templates_c\%%41^412^412F4E3D%%store_front.tpl.php") # line 1273, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty.fetch("store_front.tpl", null, null, true) # line 1123, file: C:\tshirtshop\libs\smarty\Smarty.class.php
Smarty.display("store_front.tpl") # line 20, file: C:\tshirtshop\index.php



ниже привожу листинг шаблона department.tpl



{* department.tpl *}
{load_presentation_object filename="department" assign="obj"}
<h1 class="title">{$obj->mName}</h1>
<p
class="description">{$obj->mDescription}</p>
Place list of product here
<?php
class Department

{
public $mName;
public $mDescription;

private $_mDepartmentId;
private $_mCategoryId;

public function _construct()
{
if (isset ($_GET['DepartmentId']))
$this->_mDepartmentId = (int)$_GET['DepartmentId'];
else
trigger_error('DepartmentId not set');
if (isset ($_GET['CategoryId']))
$this->_mCategoryId = (int)$_GET['CategoryId'];
}
public function init()
{
$department_details =
Catalog::GetDepartmentDetails($this->_mDepartmentId);
$this->mName = $department_details['name'];
$this->mDescription = $department_details['description'];

if (isset ($this->_mCategoryId))
{
$category_details =
Catalog::GetCategoryDetails($this->_mCategoryId);
$this->mName = $this->mName . ' » ' .
$category_details['name'];
$this->mDescription = $category_details['description'];
}
}
}

?>




Спустя 6 часов, 50 минут, 34 секунды (29.12.2010 - 00:58) jarskii написал(а):
Разобрался сам. Ненравился пхп код в файле шаблона

Спустя 41 секунда (29.12.2010 - 00:59) jarskii написал(а):
Новая ошибка


ERRNO:2
TEXT: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Moscow' for '3.0/no DST' instead
LOCATION: C:\tshirtshop\libs\smarty\Smarty_Compiler.class.php, line


Спустя 7 часов, 8 минут, 14 секунд (29.12.2010 - 08:07) Hoodzon написал(а):
Открывай php.ini
Смотри секцию [Date]
И собственно какой PHP? 5.3?

Спустя 5 часов, 26 минут, 48 секунд (29.12.2010 - 13:34) jarskii написал(а):
в php.ini правил date.timezone = "Europe/Moscow"
не спасло
Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2025 Invision Power Services, Inc.