使用smarty模板的php函数 [英] php functions using with smarty template

查看:106
本文介绍了使用smarty模板的php函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请使用smarty模板给出一些关于php函数的说明

Smarty允许您调用PHP函数,但它是假定你不需要,所以它不那么容易。 Smarty的一般理念是你应该避免将你的模板与你的应用程序代码(即PHP)绑定得太紧密,因为这会使Smarty本身有点多余。

线程可能有用:

http://www.smarty.net/forums/viewtopic.php?p=46985


please give some note about php functions using with smarty template

解决方案

Smarty does allow you to call PHP functions, but it's assumed that you shouldn't need to and so it's not as easy as it could be. The general philosophy of Smarty is that you should avoid tying your templates too closely to your application code (i.e. the PHP), as this would make Smarty itself somewhat redundant.

This thread may be of use:

http://www.smarty.net/forums/viewtopic.php?p=46985

这篇关于使用smarty模板的php函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆