当前位置:Gxlcms >
PHP教程 >
Smarty3.1.8中的注册函数registerPlugin使用有关问题
Smarty3.1.8中的注册函数registerPlugin使用有关问题
时间:2021-07-01 10:21:17
帮助过:4人阅读
Smarty 3.1.8 中的注册函数 registerPlugin使用问题
在学习smarty中遇到了这样一个问题
在php文件中我这样写
PHP code
function demo($params){
extract($params);
echo $a.$b;
}
$tpl->registerPlugin('block','demo','demo');
然后在模板 文件中这样写:
HTML code
<{demo a=1 b=text}>
<{/demo}>
输出的时候怎么输出了两个 1text 1text
求解决!
------解决方案--------------------