Chapter 12. Variables

Table of Contents
$template_dir
$compile_dir
$config_dir
$plugins_dir
$debugging
$debug_tpl
$debugging_ctrl
$autoload_filters
$compile_check
$force_compile
$caching
$cache_dir
$cache_lifetime
$cache_handler_func
$cache_modified_check
$config_overwrite
$config_booleanize
$config_read_hidden
$config_fix_newlines
$default_template_handler_func
$php_handling
$security
$secure_dir
$security_settings
$trusted_dir
$left_delimiter
$right_delimiter
$compiler_class
$request_vars_order
$request_use_auto_globals
$error_reporting
$compile_id
$use_sub_dirs
$default_modifiers
$default_resource_type

$template_dir

This is the name of the default template directory. If you do not supply a resource type when including files, they will be found here. By default this is "./templates", meaning that it will look for the templates directory in the same directory as the executing php script.

此變數是預設樣版路徑的名稱,如果你在包入檔案沒有提供檔案來源的話,則系統 會到此目錄下尋找。此變數的預設值是 "./templates",代表的意義為執行 php 程式碼的同一 個目錄下的 template 子目錄。

Technical Note: It is not recommended to put this directory under the web server document root.

技術提醒: 不建議將此值設定在網頁伺服器根目錄之下。