<?php
class TagLibMytags extends TagLib{
protected $tags=array(
"pdlist"=>array(
"close"=>0,
"attr"=>"pid",
),
);
public function _pdlist($attr){
$html_str=<<<Eof
<?php
\$pdinfo=M("Pdinfo");
\$where=array("belongproduct"=>\$pro["id"]);
\$infores=\$pdinfo->where(\$where)->select();
?>
Eof;
return $html_str; //输出数据即可
}
} 最佳答案