My code is:
$this->plugins_dir[0] = SMARTY_DIR . 'plugins';
$this->plugins_dir[1] = SMARTY_DIR . 'smarty_plugins';
and result is
ERRNO: 8 TEXT: Indirect modification of overloaded property Application::$plugins_dir has no effect
in Smarty 3.1.29
I have been finding for two days without solution.
答案 0 :(得分:0)
这不是你如何添加插件目录给smarty。也许它在以前的版本中有效但在3中没有。正确的方法是:
$smarty->setPluginsDir(SMARTY_DIR . 'plugins')
->addPluginsDir(SMARTY_DIR . 'smarty_plugins');