工作中遇到需要在smarty模板中引入一个php文件
在普遍php文件中一般直接用include 'a.php';
samrty模板中同样可以使用只是格式稍微有些不同
<{include file="<{$smarty.const.BIANLIANG}>/game.a.php" template_tag=0 template_nav=icinema}>
$smarty.const 是smarty模板中引用常量的方式
工作中遇到需要在smarty模板中引入一个php文件
在普遍php文件中一般直接用include 'a.php';
samrty模板中同样可以使用只是格式稍微有些不同
<{include file="<{$smarty.const.BIANLIANG}>/game.a.php" template_tag=0 template_nav=icinema}>
$smarty.const 是smarty模板中引用常量的方式
转载于:https://www.cnblogs.com/ddxg/p/6603964.html