किसी भी विचार क्यों मैं इस त्रुटि मिलती है: इस कोड के साथचेतावनी: लापता 1 तर्क
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
:
<?
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;
}
}
?>
मैं अपने इंडेक्स फ़ाइल में इस का उपयोग कर रहा:
$tyler = new person("Tyler");
आप index.php पर लाइनों 5 और 6 को प्रकाशित करने की जरूरत है। वह जगह है जहां बग है। – Chris