Get Smarty

Donate

Donate Bitcoin Bitcoin
Paypal

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 eyeglasses from Cheapglasses123.com and save up to 80%.

Buy prescription glasses from www.australiaglasses.com and save.

Cheap Glasses Now On Sale at GlassesPeople.com. Starts At $7.95.

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

Brautkleider auf Topwedding.de

Find free files to download on allwhatyouwant.net

Looking For Affordable Wedding Dresses 2015 at Best Prices On TDBridal.com

Shop high quality cheap prom dresses on Dresswe.co.uk

Buy New Arrival Cheap Prom Dresses 2015 at JDBRIDAL Prom Dress Store

Advertisement

Chapter 10. 调试控制台

Smarty包含了一个调试控制台。控制台可以提供当前模板的 包含模板、 赋值变量、 配置变量等信息。 Smarty文件夹内有个叫debug.tpl的模板,是控制台使用的输出模板。

Smarty中开启调试控制台的方法是设置 $debuggingTRUE。如果你需要自定义调试控制台模板请设置 $debug_tpl指向 debug.tpl模板 (默认在 SMARTY_DIR目录)。 当你打开页面,将会打开一个Javascript窗口,显示了当前模板包含的子模板名称、赋值变量等内容。

如果需要显示特定模板的变量,请参见 {debug}函数。 要关闭调试控制器,可以设置 $debuggingFALSE。 你也可以通过打开 $debugging_ctrl 而且在URL地址附加上SMARTY_DEBUG来暂时性开启调试控制台, .

技术说明

当你使用fetch() 时,调试控制器将不会出现,只有当使用了 display()才会打开控制台窗口。 程序会在当前模板中加入一系列的javascript代码以开启窗口, 如果你不喜欢javascript,你可以对debug.tpl模板进行修改。 调试信息不会被缓存,而且debug.tpl模板本身的信息不会显示在控制台里。

Note

每个模板和配置文件的载入都是以秒来计算的,甚至是以几分之一秒。

参见 疑难解答.

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 4 plus 3? (Are you human?)

Advertisement