开发者

php - Calling a function from a class within a parent class

I have a parent class, that calls a new f开发者_如何转开发acebook class within it. However, I then have another class that extends the parent, and tries to read the facebook class within it, but it dies everytime.

Any ideas?

Thanks!


My psychic debugging skills tell me that your subclass is not calling the parent constructor, so the facebook class is not being created.

If you're in PHP5, try adding parent::__construct(); to the subclass's constructor, possibly with some extra parameters. Otherwise, you might need to do: $this->SuperclassName(); with some extra parameters as well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜