調用構造函數在a.php只會從其他文件
if(condition){
include("b.inc");
b_obj = new b();//this call is not made
b_obj->a();
}
在b.inc
class b {
function b(){ //constructor
//stmts
}
function a(){
//stmts
}
}
我在PHP這個代碼現在B類的構造函數是沒有得到從其他文件調用,儘管包括文件?請幫助實現其他文件中構造函數的調用。
是的,我做到了。 – Aragorn 2012-04-05 10:22:15