$plugins_dir

This is the directory (or directories) where Smarty will look for the plugins that it needs. Default is "plugins" under the SMARTY_DIR. If you supply a relative path, Smarty will first look under the SMARTY_DIR, then relative to the cwd (current working directory), then relative to the PHP include_path. If $plugins_dir is an array of directories, Smarty will search for your plugin in each plugin directory in the order they are given.

此變數的值為當 Smarty 要找附加檔(plugin)時會到的檔案路徑,預設為 SMARTY_DIR 下的 "plugins"。如果你提供相對路徑的話,則 Smarty 會預設去找 SMARTY_DIR,再來是相對於 cwd(現在的工作目錄;current working directory),然後是相 對 PHP 的 include_path。如果 $plugins_dir 是一個目錄陣列的話,則 Smarty 將會依照所給 定的順序一個一個找出你所指定的附加檔。

Technical Note: For best performance, do not setup your plugins_dir to have to use the PHP include path. Use an absolute pathname, or a path relative to SMARTY_DIR or the cwd.

技術提醒: 為了取得更好的效能,不要讓你的 plugins_dir 變數內有 PHP 的 include 路徑。請使 用絕對路徑,或是相對於 SMARTY_DIR 或 cwd 的相對路徑。