欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

smarty报错yntax error: unrecognized tag

程序员文章站 2024-01-10 08:54:04
...
Fatal error: Smarty error: [in ./log_default.shtml line 92]: syntax error: unrecognized tag: $lang.type.$log_type.op_type_con[$info_v.op_type].op_types[$other_k][$info_v.$other_k] (Smarty_Compiler.class.php, line 446) in F:\work\zszw\manager\web\lib\smarty\Smarty.class.php on line 1093



回复讨论(解决方案)

$lang_template['type'] = array(
//日志名
'log_treasure' => array(
'name' => '宝藏日志',
//操作类型
'op_type' => array(
'OpenBox' => '打开宝藏',
),
//类型内容
'op_type_con' => array(
'OpenBox' => array(
//除开公用的op_timestamp,op_type,op_result,role_id,role_name之外的,但是不在json内的字段
'other_field' => array(
'type' => '类型',
),
//json数据
'json_field' => array(
'times' => '操作次数',
'cost' => '花费',
'item_list' => '奖励列表',
),
//可选字段,是否直接显示字段值,有出现在这个数组的将会对字段值进行转换
'op_types' => array(
'type' => array(
'1' => '青铜',
'2' => '黄金',
'3' => '神秘',
),
),
),
// '类型2' => array(
// '字段1' => '字段说明',
// '字段2' => '字段说明',
// //可选字段,是否直接显示字段值,有出现在这个数组的将会对字段值进行转换
// 'op_types' => array(
// '字段2' => array(
// '字段值1' => '字段值说明',
// '字段值2' => '字段值说明',
// ),
// ),
// ),
),
),
);
?>