What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
compileAllConfig() — すべての既知の設定ファイルをコンパイルする
string compileAllConfig(string extension,
boolean force,
integer timelimit,
integer maxerror);
この関数は、$config_dir
にある設定ファイルをコンパイルします。次のパラメータを使います。
extension
はオプションの文字列で、設定ファイルの拡張子を定義します。
デフォルトは ".conf" です。
force
はオプションの boolean 値で、変更されたファイルのみをコンパイルする
(false) か、すべての設定ファイルをコンパイルする (true) かを決めます。
デフォルトは "false" です。
timelimit
はオプションの整数値で、コンパイル処理の時間制限を秒単位で指定します。
デフォルトは無制限です。
maxerror
はオプションの静数値で、エラーの制限を設定します。
この設定を超える数の設定ファイルがコンパイルに失敗すると、この関数の処理は中断されます。
デフォルトは無制限です。
この関数は、すべての設定に対して望み通りの結果を得られるとは限りません。自己責任のもとで使ってください。
Example 13.11. compileAllTemplates()
<?php include('Smarty.class.php'); $smarty = new Smarty; // すべての設定ファイルを強制的にコンパイルします $smarty->compileAllConfig('.config',true); ?>