$compile_check

Upon each invocation of the PHP application, Smarty tests to see if the current template has changed (different time stamp) since the last time it was compiled. If it has changed, it recompiles that template. If the template has not been compiled, it will compile regardless of this setting. By default this variable is set to true. Once an application is put into production (templates won't be changing), the compile_check step is no longer needed. Be sure to set $compile_check to "false" for maximal performance. Note that if you change this to "false" and a template file is changed, you will *not* see the change since the template will not get recompiled. If caching is enabled and compile_check is enabled, then the cache files will get regenerated if an involved template file or config file was updated. See $force_compile or clear_compiled_tpl.

在 PHP 應用程式中每一次引用的時候,Smarty 會根據最後被編譯的時間,測試現 在的樣版檔案是否有改變(時間戳記是否不同)。如果有變的話,則會重新編譯樣版檔案,如果 沒有編譯樣版檔的話,則就不會考慮此變數是否有設定。預設狀況下此變數的值為 true。當應 用程式已確定是完成版本的時候(樣版都將不會再被改變),則不再需要 compile_check 的 設定。請確定將 $compile_check 設定為 "false" 以得到最好的效能。請注意如果你將此變數 的值設為 "false" 且更改樣版檔案的話,則你將不會看到改變,因為將不會重新編譯樣版檔。 如果有開啟快取與 compile_check 且引用的樣版檔案或組態檔案有更新的話,則快取的檔案 將被重新製造。請參閱 $force_compileclear_compiled_tpl