Get Smarty

Donate

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap glasses from Cheapglasses123.com and save up to 80%.

Where to buy prescription glasses? EyewearCanada.com is your best choice!

Where to buy discount wedding dresses and cheap smart dresses free shipping - Weddingdresstrend.com

Shop for 2018 World Cup Football Boots Online sale at guthjcc.com

Browse best 2018 world cup soccer cleats and shoes from SoccerAzteca.com

Advertisement

Chapter 13. Smarty成员变量

这里都是Smarty可用的成员变量。 你可以直接存取它们,或者使用相应的setter/getter方法。

Note

全部成员变量都有setter/getter的魔术方法。 和变量格式不一样的是,setter/getter方法都是用驼峰命名法。 例如,你可以使用$smarty->setTemplateDir($dir) 和 $dir = $smarty->getTemplateDir() 来存和取$smarty->template_dir变量。

Note

参见改变模板设置 来了解如何在模板中改变这些变量。

$allow_php_templates

默认PHP模板文件是不允许使用的。设置$allow_php_templates为true,则允许使用PHP模板文件。


<?php
$smarty->allow_php_templates = true;
?>

        

Note

PHP模板文件是一个不在文档中注明的废弃特性。

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 16 plus 8? (Are you human?)

Advertisement