나는이 오류 얻을 왜 어떤 생각이 코드경고 : 누락 한 인수
Warning: Missing argument 1 for person::__construct(), called in /home/fishbein/public_html/dev/OOP/index.php on line 5 and defined in /home/fishbein/public_html/dev/OOP/class_lib.php on line 6
Warning: Missing argument 1 for person::__construct(), called in /home/fishbein/public_html/dev/OOP/index.php on line 6 and defined in /home/fishbein/public_html/dev/OOP/class_lib.php on line 6
을 :
$tyler = new person("Tyler");
: 나는 또한 내 인덱스 파일이 사용하고
<?
class person {
var $name;
function __construct($persons_name) {
$this->name = $persons_name;
}
function set_name($new_name) {
$this->name = $new_name;
}
function get_name() {
return $this->name;
}
}
?>
index.php에 5 행과 6 행을 게시해야합니다. 그것이 바로 버그입니다. – Chris