Home  >  Article  >  Backend Development  >  Smarty 3.1.8 中的注册函数 registerPlugin使用有关问题

Smarty 3.1.8 中的注册函数 registerPlugin使用有关问题

WBOY
WBOYOriginal
2016-06-13 13:44:53848browse

Smarty 3.1.8 中的注册函数 registerPlugin使用问题
在学习smarty中遇到了这样一个问题
  在php文件中我这样写  

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->function demo($params){
        extract($params);
        echo $a.$b;
    }

    $tpl->registerPlugin('block','demo','demo');



然后在模板 文件中这样写:

HTML code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->



        
        


    






输出的时候怎么输出了两个 1text 1text


求解决!

------解决方案--------------------
探讨

问题还是没有解决
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn