©
本文档使用
php.cn手册 发布
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设为"false".注意:如果设为了"false",虽然模板文件被修改,但你不会看到修改结果,因为模板没有得到重新编译.如果启动了缓存和编译检查,一旦有关模板文件或配置文件被更新,缓存文件将会重建.