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;
}
}
Fatal error: Call to undefined function cuts()
为毛会出现这种情况
------解决方案--------------------
$param = $this->cuts($this->html,$param_left,$param_right);