Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Name

compileAllConfig() — 编译全部配置文件

说明

string compileAllConfig(string extension,
                        boolean force,
                        integer timelimit,
                        integer maxerror);

该函数将编译全部在$config_dir文件夹内的配置文件。 参数如下:

  • extension 字符串,指定模板文件的后缀名。默认为“.conf”。

  • force 布尔值。设定是否仅编译已修改的模板文件(false)或强制编译全部模板文件(true)。默认是false。

  • timelimit 整型,设定模板编译过程的时间限制。默认是无限制。

  • maxerror 整型,设定编译过程中出现的最大错误次数,超过此次数将停止编译。默认是无限制。

Note

该函数有可能不会生成全部预期的编译结果,所以使用会有一定风险。

Example 14.14. compileAllConfig()


<?php
include('Smarty.class.php');
$smarty = new Smarty;

// 编译全部配置文件
$smarty->compileAllConfig('.config',true);

?>

    


Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors