[STDERR] PHP Fatal error: Call to undefined method Customer::isOwnStudents() in /upload/catalog/view/theme/Super_green/template/common/header.tpl on line 62STDERR PHP 치명적인 오류 :
header.tpl이 코드 여기 뭐가 문제
<?php
if ($this->customer->isLogged()) {
if($this->customer->isOwnStudents()>0) echo $orderfood;
echo $language . $currency . $cart . $konto;`}
?>
class ModelAccountStudents extends Model {
public function isOwnStudents() {
$results = $this->getStudentses();
if(sizeof($results)>0) return true;
else return false;
}
모양) (:: 정의되지 않은 메서드의 고객에게 전화 isOwnStudents. 나는 왜 이것이 잘못을 저지른 것인지 모른다. $this->customer
이 Customer
의 인스턴스가 같은 코드에서
isOwnStudents()는 ModelAccountStudents 클래스의 함수입니다. $ this-> customer가 정의되어 있으며 ModelAccountStudents의 인스턴스입니까? –
Customer 클래스를 찾으려고합니다. 쉽지 않습니다. – user2994097
코드 "class customer"를 검색해보십시오. IDE를 사용하고 있습니까? –