在这个方法中使用了call_user_func_array函数,php手册上说这个函数的第二个参数必须为一个数组,但是这里的参数$args很明显不是数组,为什么不使用call_user_func函数了?
static public function __callstatic($method,$args){
//调用缓存驱动的方法
if(method_exists(self::$handler, $method)){
return call_user_func_array(array(self::$handler,$method), $args);
}
} 最佳答案