CodeIgniter v3 + Smarty v3 SmartyCompilerException表单验证时出错

时间:2015-11-26 14:16:26

标签: codeigniter validation smarty

遇到未捕获的异常

Type: SmartyCompilerException

Message: Syntax error in template **"/home/usedvala/public_html/UsedVala/views/templates/registration/registration.tpl"
 on line 96 "
[~ci_form_validation field='email'~]
" unknown tag "ci_form_validation"**

Filename: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php

Line Number: 96

Backtrace:

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 687
Function: trigger_template_error

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 457
Function: compileTag2

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 1395
Function: compileTag

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 2265
Function: yy_r33

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templateparser.php
Line: 2360
Function: yy_reduce

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
Line: 114
Function: doParse

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
Line: 391
Function: doCompile

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 226
Function: compileTemplate

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 152
Function: compileTemplateSource

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_template_compiled.php
Line: 199
Function: process

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/sysplugins/smarty_internal_template.php
Line: 246
Function: render

File: /home/usedvala/public_html/UsedVala/third_party/smarty/libs/Smarty.class.php
Line: 820
Function: render

File: /home/usedvala/public_html/UsedVala/libraries/Asoft_smarty.php
Line: 63
Function: fetch

File: /home/usedvala/public_html/UsedVala/controllers/Usedvala.php
Line: 94
Function: view

File: /home/usedvala/public_html/index.php
Line: 292
Function: require_once

请帮我解决这个问题: - )

1 个答案:

答案 0 :(得分:0)

您只需阅读错误即可。模板正在尝试调用名为ci_form_validation的函数,该函数在您的安装中不存在。您可能忘了将一些文件放在smarty插件的文件夹中