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

WBOY
Release: 2016-06-13 13:44:53
Original
912 people have browsed it

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');
Copy after login



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

HTML code
<!--

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

-->



        
        


    

Copy after login





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


求解决!

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

问题还是没有解决
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template