?
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
If a variable is used frequently throughout your templates, applying the default modifier every time it is mentioned can get a bit ugly. You can remedy this by assigning the variable its default value with the assign function.
如果一個變量在你的整個模板里被經常使用,而當你每次要用到這個變量的時候就給它賦默認的值,那將是無法忍受的。你可以通過使用 assign[賦值]這個函數來給這個變量賦上它的默認值來你補救。
Example 18-2. Assigning a template variable its default value 例 18-2.賦給一個模板變量默認的值
|