时间:2021-07-01 10:21:17 帮助过:5人阅读
class Template{
private $html;
public $return;
function __construct($html)
{
$this->html = $html;
}
function cuts($text,$left,$right)
{
$re = rtrim(substr($text,$left,$right-$left));
return $re;
}
function conver()
{
$field_left = strpos($this->html,"}}") + 2;
$field_right = strpos($this->html,"{{endlist}}");
$tagin = cuts($this->html,$field_left,$field_right);
print $tagin;
$param_left = strpos($this->html,"((") + 2;
$param_right = strpos($this->html,"))");
$param = cuts($this->html,$param_left,$param_right);
print $param;
}
}