这个函数是不是就像c++中的的多态啊。
回复讨论(解决方案) 我不知道这个问题是不是很白痴。。
php5 的对象新增了一个专用方法 __call(),这个方法用来监视一个对象中的其它方法。如果你试着调用一个对象中不存在或被权限控制中的方法,__call 方法将会被自动调用。
class p{ function __call($name,$arg){ echo you have this method $name?; }}$o = new p();$o->pp();
you have this method pp?
php5 的对象新增了一个专用方法 __call(),这个方法用来监视一个对象中的其它方法。如果你试着调用一个对象中不存在或被权限控制中的方法,__call 方法将会被自动调用。
class p{ function __call($name,$arg){ echo you have this method $name?; }}$o = new p();$o->pp();
you have this method pp?
我知道怎么用。就是突然这么想了。