2016-04-30 73 views
0

我在我的搜索模块中遇到了这个语法错误。有人可以看看这是什么确切的问题。Xcart搜索模块问题

// This is the path to the fts_instant_product_search.php file you uploaded. 
{php}$x=parse_url($GLOBALS['smarty']->_tpl_vars['current_location']);$GLOBALS['smarty']->assign('searchPath',$x['path']);{/php} 
searchPath = "{$searchPath}/"; 

它产生这个错误:

PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/noveltie/public_html/xcart475/skin/lumino_responsive/customer/fts_instant_product_search.tpl" on line 79 "{php}$x=parse_url($GLOBALS['smarty']->_tpl_vars['current_location']);$GLOBALS['smarty']->assign('searchPath',$x['path']);{/php}" unknown tag "php" <-- thrown in /home/xxx/public_html/xcart475/include/lib/smarty3/sysplugins/smarty_internal_templatecompilerbase.php on line 79

回答

1

X车4.7.5使用Smarty的版本3.1,不允许{} PHP标签: http://www.smarty.net/docs/en/language.function.php.tpl

IMPORTANT NOTICE

{php} tags are deprecated from Smarty, and should not be used. Put your PHP logic in PHP scripts or plugin functions instead.

As of Smarty 3.1 the {php} tags are only available from SmartyBC .

您的选择是:

  1. 联系皮肤开发者,并要求他们改变皮肤的代码,所以这将是符合智者3.1
  2. 从这里安装上述向后兼容包装: http://www.smarty.net/docs/en/bc.tpl