开发者

Problem With Constructors With Parameters In PHP

class MyClass {
  function __constructor(开发者_运维百科$A,$B,$C) {
    echo("$A $B $C");
  }
}
$MC=new MyClass('Hello','World','!');

My parameters don't seem to be making it through to the constructor... Am I doing this wrong?


Its __construct()

class MyClass {
  function __construct($A,$B,$C) {
    echo("$A $B $C");
  }
}
$MC=new MyClass('Hello','World','!');

http://us2.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜