这是我的第二个问题,即使我认为,我自己回答了前一个问题。无论如何,我有一个关于OOP的基本问题,关于如何从另一个类调用非静态方法。例如: 我们在一个文件中的类命名为A A.class.php如何从另一个类中调用非静态方法
class A {
public function doSomething(){
//doing something.
}
}
,并在另一个文件中的第二类称为b B.class.php
require_once 'A.class.php';
class B {
//Call the method doSomething() from the class A.
}
我认为现在是clearn 。如何:从类A调用方法doSomething()?
很简单,谢谢! – Be0wulf
@MohamedAdibErrifai没问题,希望它有帮助! – newfurniturey
我的帖子不错的副本 – JvdBerg