2
저는 PHP OOP로 초보자입니다. 나는 클래스가 출력이 비어 : 이름 1 인 -missed POST가 < 작업 작업 :PHP 클래스는 아무 것도 반환하지 않습니다.
$test = new form('name1', 'passw2');
$test->getName();
및 클래스 :
<?php
class form
{
protected $username;
protected $password;
protected $errors = array();
function _construct($username, $password){
$this->username=$username;
$this->password=$password;
}
public function getsomething() {
echo '<br>working'. $this->getn() . '<-missed';
}
public function getName(){
return $this->getsomething();
}
public function getn() {
return $this->username;
}
}
?>
그리고 출력은 이름없이 텍스트 만있다?
1)' 그냥 NULL을 반환합니다. – Rizier123
@ Rizier123 방금 내가 흔적이라고 말한 방법. –