请参阅屏幕截图数据中的文件结构你好,朋友们,
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发行版中包含的演示应用程序的一部分。您应该完全删除demo目录,并将您的插件放在smarty/libs/plugins目录中。