在 smarty version3 中,我在文件夹结构中看到我们有 2 个插件目录,应该用于创建自定义插件功能?

问题描述

see file structure in screenshot atachment 你好朋友,

I see in smarty template version3 two plugin directory.
one into project folder and other into libs. 
In libs folder we have plugins and sysplugins directory. 

我的问题是我需要创建一个自定义函数,所以我需要放置新的 文件放入其中 目录是最好的方法吗?

Both way working I checked but which is the best way to put custom plugin file in which directory? 

解决方法

您可以将插件放在已添加到 Smarty plugins_dir 的任何目录中,但是查看您的屏幕截图,您正在查看的“其他”插件目录似乎是包含在其中的演示应用程序的一部分Smarty 分布。您应该完全删除演示目录并将您的插件放在 smarty/libs/plugins 目录中。