?
本文檔使用 PHP中文網(wǎng)手冊(cè) 發(fā)布
This is a list of variables that are always implicitly assigned
to the template engine. This is handy for making global
variables or server variables available to all templates
without having to manually assign them. Each element in the
$global_assign should be either a name of the global variable,
or a key/value pair, where the key is the name of the global
array and the value is the array of variables to be assigned
from that global array. $SCRIPT_NAME is globally assigned by
default from $HTTP_SERVER_VARS.
定義一組總是隱式地作用于模板引擎的變量列表。這對(duì)于使全局變量或服務(wù)器變量可用于所有模板是很方便的,因?yàn)闊o(wú)需手工配置它們。在全局配置中的每一元素應(yīng)當(dāng)要么是一全局變量的名字,要么是一鍵/值對(duì)(鍵是全局?jǐn)?shù)組名,值是對(duì)應(yīng)該全局?jǐn)?shù)組的變量數(shù)組)。$SCRIPT_NAME變量默認(rèn)屬于$HTTP_SERVER_VARS數(shù)組。
Technical Note: Server variables can be accessed through the $smarty variable, such as {$smarty.server.SCRIPT_NAME}. See the section on the $smarty variable.
技巧:服務(wù)器變量可以通過(guò)$smarty變量獲得,如{$smarty.server.SCRIPT_NAME}。參看$smarty變量一節(jié)。