<?php
namespace Think\Template\TagLib;
use Think\Template\TagLib;
import('TagLib');
//自定义标签库
Class Hd extends TagLib {
protected $tags = array(
'nav' => array ('attr' => 'limit,order','close' => 1)
);
public function _nav ($attr, $content) {
$attr=$this->parseXmlAttr($attr);
p( $attr);
}
}
?>错误信息::(
XML标签语法错误 : Array
错误位置
FILE: D:\wamp\www\thinkphp\ThinkPHP\Library\Think\Template\TagLib.class.php LINE: 82
TRACE
#0 D:\wamp\www\thinkphp\ThinkPHP\Library\Think\Template\TagLib.class.php(82): E('XML????????????...')
#1 D:\wamp\www\thinkphp\ThinkPHP\Library\Think\Template\TagLib\Hd.class.php(14): Think\Template\TagLib->parseXmlAttr(Array)
#2 D:\wamp\www\thinkphp\ThinkPHP\Library\Think\Template.class.php(446): Think\Template\TagLib\Hd->_nav(Array, '
•#3 D:\wamp\www\thinkphp\ThinkPHP\Library\Think\Template.class.php(422): Think\Template->parseXmlTag(Object(Think\Template\TagLib\Hd), 'nav', 'name="Home\\Tag...', '?? ...') 最佳答案