类中的方法调用方法是$this->把,帮我瞧瞧哪里出问题了,谢谢!
class car{
public function rec(){
echo "你好";
public function caa(){
$this->rec();
}
}
}
$cat=new car();
$cat->caa();
结果显示Parse error: syntax error, unexpected T_PUBLIC in D:\WWW\lianxi.php on line 9
class car{
public function rec(){
echo "你好";
public function caa(){
$this->rec();
}
}
}
$cat=new car();
$cat->caa();
结果显示Parse error: syntax error, unexpected T_PUBLIC in D:\WWW\lianxi.php on line 9
2016-09-20
举报