国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

Smarty成員方法:compileAllTemplates()

2018-10-20 11:31 更新

Name

compileAllTemplates() — 編譯全部模板

說明

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

該函數(shù)將編譯$template_dir目錄下的模板文件。 參數(shù)如下:

  • extension 字符串,指定模板文件的后綴名。默認為“.tpl”。

  • force 布爾值。設(shè)定是否僅編譯已修改的模板文件(false)或強制編譯全部模板文件(true)。默認是false。

  • timelimit 整型,設(shè)定模板編譯過程的時間限制。默認是無限制。

  • maxerror 整型,設(shè)定編譯過程中出現(xiàn)的最大錯誤次數(shù),超過此次數(shù)將停止編譯。默認是無限制。

溫馨提示:

該函數(shù)有可能不會生成全部預期的編譯結(jié)果,所以使用會有一定風險。

溫馨提示:

如模板需要注冊插件、過濾器或?qū)ο蟮龋趫?zhí)行該函數(shù)之前必須先注冊這些東西。

溫馨提示:

如果使用模板繼承,那么該函數(shù)將編譯產(chǎn)生父模板的編譯文件,但這些編譯文件將永遠也不會被使用到。

Example 14.15. compileAllTemplates()

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

// 強制編譯全部模板
$smarty->compileAllTemplates('.tpl',true);

?>

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號